File tree 1 file changed +5
-2
lines changed
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 {
334
334
fn rollup_traits ( cx : & LateContext < ' _ > , bounds : & [ GenericBound < ' _ > ] , msg : & str ) {
335
335
let mut map = FxHashMap :: default ( ) ;
336
336
let mut repeated_res = false ;
337
- for bound in bounds. iter ( ) . filter_map ( |bound| {
337
+
338
+ let only_comparable_trait_refs = |bound : & GenericBound < ' _ > | {
338
339
if let GenericBound :: Trait ( t, _) = bound {
339
340
Some ( ( into_comparable_trait_ref ( & t. trait_ref ) , t. span ) )
340
341
} else {
341
342
None
342
343
}
343
- } ) {
344
+ } ;
345
+
346
+ for bound in bounds. iter ( ) . filter_map ( only_comparable_trait_refs) {
344
347
let ( comparable_bound, span_direct) = bound;
345
348
if map. insert ( comparable_bound, span_direct) . is_some ( ) {
346
349
repeated_res = true ;
You can’t perform that action at this time.
0 commit comments