Skip to content

Commit d5fe024

Browse files
[autofix.ci] apply automated fixes
1 parent 3d98ce4 commit d5fe024

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tasks/linter_codegen/src/main.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,9 @@ impl MatchKindDetector {
364364
// variants from that match. Otherwise, guards are disallowed.
365365
if func.block.stmts.len() == 1 {
366366
if let Stmt::Expr(Expr::Match(m), _) = &func.block.stmts[0] {
367-
if let Some(vars) = extract_variants_from_top_level_match(m, /*allow_guards=*/true) {
367+
if let Some(vars) =
368+
extract_variants_from_top_level_match(m, /*allow_guards=*/ true)
369+
{
368370
collected.extend(vars);
369371
}
370372
// We handled the only statement; proceed to next impl item.
@@ -375,7 +377,9 @@ impl MatchKindDetector {
375377
for stmt in &func.block.stmts {
376378
// Case 1: bare `match node.kind()` as a top-level statement
377379
if let Stmt::Expr(Expr::Match(m), _) = stmt {
378-
if let Some(vars) = extract_variants_from_top_level_match(m, /*allow_guards=*/false) {
380+
if let Some(vars) =
381+
extract_variants_from_top_level_match(m, /*allow_guards=*/ false)
382+
{
379383
collected.extend(vars);
380384
}
381385
continue;
@@ -384,7 +388,9 @@ impl MatchKindDetector {
384388
if let Stmt::Local(local) = stmt {
385389
if let Some(init) = &local.init {
386390
if let Expr::Match(m) = &*init.expr {
387-
if let Some(vars) = extract_variants_from_top_level_match(m, /*allow_guards=*/false) {
391+
if let Some(vars) = extract_variants_from_top_level_match(
392+
m, /*allow_guards=*/ false,
393+
) {
388394
collected.extend(vars);
389395
}
390396
}

0 commit comments

Comments
 (0)