File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ impl Cli {
7474 . map_err ( |e| anyhow ! ( "reading {:?}: {}" , paths_from_file, e) ) ?;
7575 let reader = std:: io:: BufReader :: new ( file) ;
7676 Ok ( Box :: new (
77- reader. lines ( ) . filter_map ( |l| l . ok ( ) ) . map ( PathBuf :: from) ,
77+ reader. lines ( ) . map_while ( Result :: ok ) . map ( PathBuf :: from) ,
7878 ) )
7979 } else {
8080 Ok ( self . root_paths ( ) . into_iter ( ) . map ( walk_files) . fold (
Original file line number Diff line number Diff line change @@ -48,13 +48,13 @@ impl RuleSet {
4848 /// Returns the owners for the given path, or `None` if no rules match the
4949 /// path or the matching rule has no owners.
5050 pub fn owners ( & self , path : impl AsRef < Path > ) -> Option < & [ Owner ] > {
51- return self . matching_rule ( path) . and_then ( |rule| {
51+ self . matching_rule ( path) . and_then ( |rule| {
5252 if rule. owners . is_empty ( ) {
5353 None
5454 } else {
5555 Some ( rule. owners . as_ref ( ) )
5656 }
57- } ) ;
57+ } )
5858 }
5959
6060 /// Returns the all rules that match the given path along with their indices.
You can’t perform that action at this time.
0 commit comments