File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -347,14 +347,16 @@ pub fn compile_rustfmt(
347347}
348348
349349fn search_for_rs_files ( repo : & Path ) -> impl Iterator < Item = PathBuf > {
350- return WalkDir :: new ( repo)
351- . into_iter ( )
352- . filter_map ( |e| e. ok ( ) )
353- . filter ( |entry| {
350+ return WalkDir :: new ( repo) . into_iter ( ) . filter_map ( |e| match e. ok ( ) {
351+ Some ( entry) => {
354352 let path = entry. path ( ) ;
355- return path. is_file ( ) && path. extension ( ) . map_or ( false , |ext| ext == "rs" ) ;
356- } )
357- . map ( |entry| entry. into_path ( ) ) ;
353+ if path. is_file ( ) && path. extension ( ) . map_or ( false , |ext| ext == "rs" ) {
354+ return Some ( entry. into_path ( ) ) ;
355+ }
356+ return None ;
357+ }
358+ None => None ,
359+ } ) ;
358360}
359361
360362pub fn check_diff ( config : Option < Vec < String > > , runners : CheckDiffRunners , repo : & Path ) -> i32 {
You can’t perform that action at this time.
0 commit comments