@@ -221,9 +221,12 @@ fn main() {
221221 let limit_filesystem = options. limit_filesystem ;
222222 let follow_links = options. dereference_links ;
223223
224- let allowed_filesystems = limit_filesystem
225- . then ( || get_filesystem_devices ( & target_dirs, follow_links) )
226- . unwrap_or_default ( ) ;
224+ let allowed_filesystems = if limit_filesystem {
225+ get_filesystem_devices ( & target_dirs, follow_links)
226+ } else {
227+ Default :: default ( )
228+ } ;
229+
227230 let simplified_dirs = simplify_dir_names ( & target_dirs) ;
228231
229232 let ignored_full_path: HashSet < PathBuf > = ignore_directories
@@ -359,7 +362,7 @@ fn print_any_errors(print_errors: bool, errors: Arc<Mutex<RuntimeErrors>>) {
359362 . map ( |a| a. as_ref ( ) )
360363 . collect :: < Vec < & str > > ( )
361364 . join ( ", " ) ;
362- eprintln ! ( "No such file or directory: {}" , err ) ;
365+ eprintln ! ( "No such file or directory: {err}" ) ;
363366 }
364367 if !final_errors. no_permissions . is_empty ( ) {
365368 if print_errors {
@@ -369,7 +372,7 @@ fn print_any_errors(print_errors: bool, errors: Arc<Mutex<RuntimeErrors>>) {
369372 . map ( |a| a. as_ref ( ) )
370373 . collect :: < Vec < & str > > ( )
371374 . join ( ", " ) ;
372- eprintln ! ( "Did not have permissions for directories: {}" , err ) ;
375+ eprintln ! ( "Did not have permissions for directories: {err}" ) ;
373376 } else {
374377 eprintln ! (
375378 "Did not have permissions for all directories (add --print-errors to see errors)"
@@ -383,7 +386,7 @@ fn print_any_errors(print_errors: bool, errors: Arc<Mutex<RuntimeErrors>>) {
383386 . map ( |a| a. as_ref ( ) )
384387 . collect :: < Vec < & str > > ( )
385388 . join ( ", " ) ;
386- eprintln ! ( "Unknown Error: {}" , err ) ;
389+ eprintln ! ( "Unknown Error: {err}" ) ;
387390 }
388391}
389392
0 commit comments