Skip to content

Commit

Permalink
feat: improve warning messages
Browse files Browse the repository at this point in the history
  • Loading branch information
KSXGitHub committed Nov 25, 2024
1 parent 30883d7 commit 053527e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/sub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ where
|disk| disk.kind(),
|disk| disk.mount_point(),
) {
eprintln!("warning: HDD detected, the thread limit will be set to 1");
rayon::ThreadPoolBuilder::new()
.num_threads(1)
.build_global()
.unwrap_or_else(|_| eprintln!("warning: This program is suboptimal with HDD"));
.unwrap_or_else(|_| eprintln!("warning: Failed to set thread limit to 1"));
}

let mut iter = files
Expand Down

0 comments on commit 053527e

Please sign in to comment.