clippy::filter_next

This commit is contained in:
Matthias Krüger 2021-07-21 21:46:02 +02:00
parent aa74c75d84
commit 066eb6ab5d

View File

@ -290,13 +290,9 @@ fn suggest_restriction(
} else { } else {
// Trivial case: `T` needs an extra bound: `T: Bound`. // Trivial case: `T` needs an extra bound: `T: Bound`.
let (sp, suggestion) = match ( let (sp, suggestion) = match (
generics generics.params.iter().find(|p| {
.params
.iter()
.filter(|p| {
!matches!(p.kind, hir::GenericParamKind::Type { synthetic: Some(_), .. }) !matches!(p.kind, hir::GenericParamKind::Type { synthetic: Some(_), .. })
}) }),
.next(),
super_traits, super_traits,
) { ) {
(_, None) => predicate_constraint( (_, None) => predicate_constraint(