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 {
// Trivial case: `T` needs an extra bound: `T: Bound`.
let (sp, suggestion) = match (
generics
.params
.iter()
.filter(|p| {
!matches!(p.kind, hir::GenericParamKind::Type { synthetic: Some(_), .. })
})
.next(),
generics.params.iter().find(|p| {
!matches!(p.kind, hir::GenericParamKind::Type { synthetic: Some(_), .. })
}),
super_traits,
) {
(_, None) => predicate_constraint(