Skip to content

Commit 741177b

Browse files
[autofix.ci] apply automated fixes
1 parent d4b7b37 commit 741177b

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

crates/oxc_linter/src/rules/promise/no_multiple_resolved.rs

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ use oxc_ast::{
66
};
77
use oxc_ast_visit::Visit;
88
use oxc_cfg::{
9+
BlockNodeId, ControlFlowGraph, EdgeType, ErrorEdgeKind, InstructionKind,
910
graph::{
10-
visit::{set_depth_first_search, Control, DfsEvent, EdgeRef}, Direction
11-
}, BlockNodeId, ControlFlowGraph, EdgeType, ErrorEdgeKind, InstructionKind
11+
Direction,
12+
visit::{Control, DfsEvent, EdgeRef, set_depth_first_search},
13+
},
1214
};
1315
use oxc_diagnostics::OxcDiagnostic;
1416
use oxc_macros::declare_oxc_lint;
@@ -216,12 +218,14 @@ impl<'a, 'b> MultipleResolvedChecker<'a, 'b> {
216218
Some(&mut self.current_func_resolved_info_mut()?.resolved_infos)
217219
}
218220

219-
#[inline]
220-
fn block_resolved_info_mut(&mut self, block_id: BlockNodeId) -> Option<&mut BlockResolvedInfo<'a>> {
221+
#[inline]
222+
fn block_resolved_info_mut(
223+
&mut self,
224+
block_id: BlockNodeId,
225+
) -> Option<&mut BlockResolvedInfo<'a>> {
221226
self.resolved_infos_mut()?.get_mut(&block_id)
222227
}
223228

224-
225229
#[inline]
226230
fn block_ids(&self) -> Option<&Vec<BlockNodeId>> {
227231
Some(&self.current_func_resolved_info()?.block_ids)
@@ -236,8 +240,7 @@ impl<'a, 'b> MultipleResolvedChecker<'a, 'b> {
236240

237241
#[inline]
238242
fn dominators(&self) -> Option<&FxHashMap<BlockNodeId, BlockNodeId>> {
239-
Some(&self
240-
.current_func_resolved_info()?.dominators)
243+
Some(&self.current_func_resolved_info()?.dominators)
241244
}
242245

243246
#[inline]
@@ -598,13 +601,19 @@ impl<'a, 'b> MultipleResolvedChecker<'a, 'b> {
598601
self.ctx.diagnostic(already_resolved_diagnostic(line, multi_resolved.span));
599602
});
600603
}
601-
self.insert_block_resolved_info(block_id, BlockResolvedInfo::new(
602-
resolved.first().copied(),
603-
ResolvedKind::Certain,
604-
throwable_after_resolved,
605-
));
604+
self.insert_block_resolved_info(
605+
block_id,
606+
BlockResolvedInfo::new(
607+
resolved.first().copied(),
608+
ResolvedKind::Certain,
609+
throwable_after_resolved,
610+
),
611+
);
606612
} else {
607-
self.insert_block_resolved_info(block_id, BlockResolvedInfo::new(None, ResolvedKind::None, throwable_after_resolved))
613+
self.insert_block_resolved_info(
614+
block_id,
615+
BlockResolvedInfo::new(None, ResolvedKind::None, throwable_after_resolved),
616+
)
608617
}
609618
}
610619
}

0 commit comments

Comments
 (0)