Navigation Menu

Skip to content

Commit

Permalink
clippy::filter_next
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Jul 25, 2021
1 parent aa74c75 commit 066eb6a
Showing 1 changed file with 3 additions and 7 deletions.
Expand Up @@ -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(
Expand Down

0 comments on commit 066eb6a

Please sign in to comment.