This repository was archived by the owner on May 28, 2025. It is now read-only.
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>> {
476476
477477 /// Returns an iterator over the items which are `Some`.
478478 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 ( )
480480 }
481481}
482482
Original file line number Diff line number Diff line change @@ -1107,8 +1107,7 @@ impl<'a> Parser<'a> {
11071107 e
11081108 } ) ?;
11091109
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 ( ) } ;
11121111 Ok ( ( id, ItemKind :: Enum ( enum_definition, generics) ) )
11131112 }
11141113
Original file line number Diff line number Diff line change @@ -791,7 +791,7 @@ fn fn_sig_suggestion<'tcx>(
791791 } )
792792 } )
793793 . chain ( std:: iter:: once ( if sig. c_variadic { Some ( "..." . to_string ( ) ) } else { None } ) )
794- . filter_map ( |arg| arg )
794+ . flatten ( )
795795 . collect :: < Vec < String > > ( )
796796 . join ( ", " ) ;
797797 let output = sig. output ( ) ;
You can’t perform that action at this time.
0 commit comments