diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-12-11 19:13:16 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-12-11 23:02:19 +0100 |
| commit | cf10a0abf23850018b32ed9a15b1bce6a1e71c93 (patch) | |
| tree | 925915165d73c1b42e9e877838a46f094851498e | |
| parent | 5833f74a9cd2316dae030155a36c16bcc7805da5 (diff) | |
| download | rust-cf10a0abf23850018b32ed9a15b1bce6a1e71c93.tar.gz rust-cf10a0abf23850018b32ed9a15b1bce6a1e71c93.zip | |
fix clippy::unnecessary_filter_map
| -rw-r--r-- | compiler/rustc_builtin_macros/src/deriving/generic/mod.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs b/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs index a767de53dae..68c11868af8 100644 --- a/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs +++ b/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs @@ -597,10 +597,7 @@ impl<'a> TraitDef<'a> { let mut ty_params = params .iter() - .filter_map(|param| match param.kind { - ast::GenericParamKind::Type { .. } => Some(param), - _ => None, - }) + .filter(|param| matches!(param.kind, ast::GenericParamKind::Type{..})) .peekable(); if ty_params.peek().is_some() { |
