Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading