Skip to content

Commit 147ea6c

Browse files
committed
handle Tup and Binary
1 parent 1892b0b commit 147ea6c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

clippy_lints/src/suspicious_chained_operators.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ impl <'expr> Iterator for IdentIter<'expr> {
348348
IdentIter::new(expr)
349349
)
350350
},
351-
ExprKind::Array(ref exprs) => {
351+
ExprKind::Array(ref exprs)|ExprKind::Tup(ref exprs) => {
352352
set_and_call_next!(
353353
exprs.iter()
354354
.flat_map(IdentIter::new_p)
@@ -374,6 +374,14 @@ impl <'expr> Iterator for IdentIter<'expr> {
374374
)
375375
)
376376
},
377+
ExprKind::Binary(_, ref left, ref right) => {
378+
set_and_call_next!(
379+
IdentIter::new(left)
380+
.chain(
381+
IdentIter::new(right)
382+
)
383+
)
384+
},
377385
_ => todo!(),
378386
};
379387

0 commit comments

Comments
 (0)