File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 8181 Threads :: Auto => {
8282 // If one of the files is on HDD, set thread number to 1
8383 let disks = Disks :: new_with_refreshed_list ( ) ;
84- eprintln ! ( "warning: HDD detected, the thread limit will be set to 1" ) ;
85- any_path_is_in_hdd :: < hdd:: RealApi > ( & files, & disks) . then_some ( 1 )
84+ if any_path_is_in_hdd :: < hdd:: RealApi > ( & files, & disks) {
85+ eprintln ! ( "warning: HDD detected, the thread limit will be set to 1" ) ;
86+ Some ( 1 )
87+ } else {
88+ None
89+ }
8690 }
8791 Threads :: Max => None ,
8892 Threads :: Fixed ( threads) => Some ( threads) ,
Original file line number Diff line number Diff line change @@ -158,7 +158,6 @@ fn fs_errors() {
158158 let expected_stderr_lines = btreeset ! {
159159 "[error] read_dir \" ./nested/0\" : Permission denied (os error 13)" ,
160160 "[error] read_dir \" ./empty-dir\" : Permission denied (os error 13)" ,
161- "warning: HDD detected, the thread limit will be set to 1" , // TODO: fix this bug
162161 } ;
163162 assert_eq ! ( actual_stderr_lines, expected_stderr_lines) ;
164163
You can’t perform that action at this time.
0 commit comments