File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -334,13 +334,16 @@ fn into_comparable_trait_ref(trait_ref: &TraitRef<'_>) -> ComparableTraitRef {
334334fn rollup_traits ( cx : & LateContext < ' _ > , bounds : & [ GenericBound < ' _ > ] , msg : & str ) {
335335 let mut map = FxHashMap :: default ( ) ;
336336 let mut repeated_res = false ;
337- for bound in bounds. iter ( ) . filter_map ( |bound| {
337+
338+ let only_comparable_trait_refs = |bound : & GenericBound < ' _ > | {
338339 if let GenericBound :: Trait ( t, _) = bound {
339340 Some ( ( into_comparable_trait_ref ( & t. trait_ref ) , t. span ) )
340341 } else {
341342 None
342343 }
343- } ) {
344+ } ;
345+
346+ for bound in bounds. iter ( ) . filter_map ( only_comparable_trait_refs) {
344347 let ( comparable_bound, span_direct) = bound;
345348 if map. insert ( comparable_bound, span_direct) . is_some ( ) {
346349 repeated_res = true ;
You can’t perform that action at this time.
0 commit comments