Skip to content

Commit 6dbcf14

Browse files
committed
Use new version of for_each_expr in check_manual_pattern_char_comparison
1 parent 2c6efa7 commit 6dbcf14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/string_patterns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ fn check_manual_pattern_char_comparison(cx: &LateContext<'_>, method_arg: &Expr<
131131

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

0 commit comments

Comments
 (0)