Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Dec 26, 2024
1 parent 14a1598 commit a024af8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions crates/oxc_linter/src/rules/eslint/curly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,17 @@ impl Rule for Curly {
}
}

statements.iter().zip(&has_braces_list).zip(&statements_are_else).for_each(|((statement, &has_braces), is_else)| {
let keyword = if *is_else { "else" } else { "if" };
report_if_needed(ctx, statement, keyword, has_braces, expected);
});
statements.iter().zip(&has_braces_list).zip(&statements_are_else).for_each(
|((statement, &has_braces), is_else)| {
let keyword = if *is_else { "else" } else { "if" };
report_if_needed(ctx, statement, keyword, has_braces, expected);
},
);
} else {
statements
.iter()
.zip(should_have_braces_list.iter().zip(&has_braces_list)).zip(&statements_are_else)
.zip(should_have_braces_list.iter().zip(&has_braces_list))
.zip(&statements_are_else)
.for_each(|((statement, (&should_have_braces, &has_braces)), is_else)| {
let keyword = if *is_else { "else" } else { "if" };
report_if_needed(
Expand Down

0 comments on commit a024af8

Please sign in to comment.