Skip to content

Commit

Permalink
Use new version of for_each_expr in check_manual_pattern_char_comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
AurelienFT committed Jun 7, 2024
1 parent 2c6efa7 commit 6dbcf14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/string_patterns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ fn check_manual_pattern_char_comparison(cx: &LateContext<'_>, method_arg: &Expr<

// We want to retrieve all the comparisons done.
// They are ordered in a nested way and so we need to traverse the AST to collect them all.
if for_each_expr(body.value, |sub_expr| -> ControlFlow<(), Descend> {
if for_each_expr(cx, body.value, |sub_expr| -> ControlFlow<(), Descend> {
match sub_expr.kind {
ExprKind::Binary(op, left, right) if op.node == BinOpKind::Eq => {
if path_to_local_id(left, binding)
Expand Down

0 comments on commit 6dbcf14

Please sign in to comment.