fix clippy::unnecessary_filter_map

This commit is contained in:
Matthias Krüger 2020-12-11 19:13:16 +01:00
parent 5833f74a9c
commit cf10a0abf2

View File

@ -597,10 +597,7 @@ fn create_derived_impl(
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() {