Skip to content

Commit

Permalink
fix(minifier): fix clippy::suspicious_operation_groupings warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Feb 19, 2025
1 parent 3414824 commit 84f01a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ significant_drop_in_scrutinee = "warn"
iter_on_single_items = "warn"
unused_peekable = "warn"
too_long_first_doc_paragraph = "warn"
suspicious_operation_groupings = "warn"
# cargo
cargo = { level = "warn", priority = -1 }
multiple_crate_versions = "allow"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ impl<'a> PeepholeOptimizations {
// we can improve compression by allowing side effects on one side if the other side is
// an identifier that is not modified after it is declared.
// but for now, we only perform compression if neither side has side effects.
&& !(expr.test.may_have_side_effects(&ctx)
|| consequent.callee.may_have_side_effects(&ctx))
&& !expr.test.may_have_side_effects(&ctx)
&& !consequent.callee.may_have_side_effects(&ctx)
&& ctx.expr_eq(&consequent.callee, &alternate.callee)
&& consequent
.arguments
Expand Down

0 comments on commit 84f01a6

Please sign in to comment.