File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -476,7 +476,7 @@ impl<T> PerNS<Option<T>> {
476
476
477
477
/// Returns an iterator over the items which are `Some`.
478
478
pub fn present_items ( self ) -> impl Iterator < Item = T > {
479
- IntoIter :: new ( [ self . type_ns , self . value_ns , self . macro_ns ] ) . filter_map ( |it| it )
479
+ IntoIter :: new ( [ self . type_ns , self . value_ns , self . macro_ns ] ) . flatten ( )
480
480
}
481
481
}
482
482
Original file line number Diff line number Diff line change @@ -1107,8 +1107,7 @@ impl<'a> Parser<'a> {
1107
1107
e
1108
1108
} ) ?;
1109
1109
1110
- let enum_definition =
1111
- EnumDef { variants : variants. into_iter ( ) . filter_map ( |v| v) . collect ( ) } ;
1110
+ let enum_definition = EnumDef { variants : variants. into_iter ( ) . flatten ( ) . collect ( ) } ;
1112
1111
Ok ( ( id, ItemKind :: Enum ( enum_definition, generics) ) )
1113
1112
}
1114
1113
Original file line number Diff line number Diff line change @@ -791,7 +791,7 @@ fn fn_sig_suggestion<'tcx>(
791
791
} )
792
792
} )
793
793
. chain ( std:: iter:: once ( if sig. c_variadic { Some ( "..." . to_string ( ) ) } else { None } ) )
794
- . filter_map ( |arg| arg )
794
+ . flatten ( )
795
795
. collect :: < Vec < String > > ( )
796
796
. join ( ", " ) ;
797
797
let output = sig. output ( ) ;
You can’t perform that action at this time.
0 commit comments