File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -11,18 +11,18 @@ const LIMIT: usize = 320;
1111
1212pub fn check ( ) {
1313 let stderr_files = stderr_files ( ) ;
14- let exceeding_files = exceeding_stderr_files ( stderr_files) ;
14+ let exceeding_files = exceeding_stderr_files ( stderr_files) . collect :: < Vec < String > > ( ) ;
1515
1616 if !exceeding_files. is_empty ( ) {
17- println ! ( "Error: stderr files exceeding limit of {} lines:" , LIMIT ) ;
17+ eprintln ! ( "Error: stderr files exceeding limit of {} lines:" , LIMIT ) ;
1818 for path in exceeding_files {
1919 println ! ( "{}" , path) ;
2020 }
2121 std:: process:: exit ( 1 ) ;
2222 }
2323}
2424
25- fn exceeding_stderr_files ( files : impl Iterator < Item = walkdir:: DirEntry > ) -> Vec < String > {
25+ fn exceeding_stderr_files ( files : impl Iterator < Item = walkdir:: DirEntry > ) -> impl Iterator < Item = String > {
2626 files
2727 . filter_map ( |file| {
2828 let path = file. path ( ) . to_str ( ) . expect ( "Could not convert path to str" ) . to_string ( ) ;
@@ -33,7 +33,6 @@ fn exceeding_stderr_files(files: impl Iterator<Item = walkdir::DirEntry>) -> Vec
3333 None
3434 }
3535 } )
36- . collect ( )
3736}
3837
3938fn stderr_files ( ) -> impl Iterator < Item = walkdir:: DirEntry > {
You can’t perform that action at this time.
0 commit comments