mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-26 06:35:27 +00:00
clippy::filter_next
This commit is contained in:
parent
aa74c75d84
commit
066eb6ab5d
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user