diff options
| author | rail <12975677+rail-rain@users.noreply.github.com> | 2020-10-02 21:30:21 +1300 |
|---|---|---|
| committer | rail <12975677+rail-rain@users.noreply.github.com> | 2020-10-02 21:38:50 +1300 |
| commit | 2a0e45b8dbfa9c8494371983b128b933082a9c13 (patch) | |
| tree | a08d00d4873c21fa352b6fea410917588a732456 | |
| parent | 41a0ccbc57902e488e62ed8ca9a1ebb565129c09 (diff) | |
| download | rust-2a0e45b8dbfa9c8494371983b128b933082a9c13.tar.gz rust-2a0e45b8dbfa9c8494371983b128b933082a9c13.zip | |
supress `clippy::filter_map`
| -rw-r--r-- | clippy_lints/src/loops.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clippy_lints/src/loops.rs b/clippy_lints/src/loops.rs index 4f279cc5ef7..d3a1683cc0c 100644 --- a/clippy_lints/src/loops.rs +++ b/clippy_lints/src/loops.rs @@ -1014,6 +1014,9 @@ fn get_assignments<'a: 'c, 'tcx: 'c, 'c>( Block { stmts, expr, .. }: &'tcx Block<'tcx>, loop_counters: &'c [Start<'tcx>], ) -> impl Iterator<Item = Option<(&'tcx Expr<'tcx>, &'tcx Expr<'tcx>)>> + 'c { + // As the `filter` and `map` below do different things, I think putting together + // just increases complexity. (cc #3188 and #4193) + #[allow(clippy::filter_map)] stmts .iter() .filter_map(move |stmt| match stmt.kind { |
