Skip to content

Commit 2a0e45b

Browse files
committed
supress clippy::filter_map
1 parent 41a0ccb commit 2a0e45b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clippy_lints/src/loops.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,9 @@ fn get_assignments<'a: 'c, 'tcx: 'c, 'c>(
10141014
Block { stmts, expr, .. }: &'tcx Block<'tcx>,
10151015
loop_counters: &'c [Start<'tcx>],
10161016
) -> impl Iterator<Item = Option<(&'tcx Expr<'tcx>, &'tcx Expr<'tcx>)>> + 'c {
1017+
// As the `filter` and `map` below do different things, I think putting together
1018+
// just increases complexity. (cc #3188 and #4193)
1019+
#[allow(clippy::filter_map)]
10171020
stmts
10181021
.iter()
10191022
.filter_map(move |stmt| match stmt.kind {

0 commit comments

Comments
 (0)