Skip to content

Commit 14af563

Browse files
committed
Remove useless call to combine_seq
`combine_seq(x, NeverLoopResult::Otherwise)` always returns `x`
1 parent 5adeebf commit 14af563

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/loops/never_loop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ fn never_loop_expr(expr: &Expr<'_>, ignore_ids: &mut Vec<HirId>, main_loop_id: H
191191
// checks if break targets a block instead of a loop
192192
ExprKind::Break(Destination { target_id: Ok(t), .. }, e) if ignore_ids.contains(&t) => e
193193
.map_or(NeverLoopResult::Otherwise, |e| {
194-
combine_seq(never_loop_expr(e, ignore_ids, main_loop_id), NeverLoopResult::Otherwise)
194+
never_loop_expr(e, ignore_ids, main_loop_id)
195195
}),
196196
ExprKind::Break(_, e) | ExprKind::Ret(e) => e.as_ref().map_or(NeverLoopResult::AlwaysBreak, |e| {
197197
combine_seq(

0 commit comments

Comments
 (0)