From 053527ecf913497ade965186f382c41b66818975 Mon Sep 17 00:00:00 2001 From: khai96_ Date: Mon, 25 Nov 2024 18:17:56 +0700 Subject: [PATCH] feat: improve warning messages --- src/app/sub.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/sub.rs b/src/app/sub.rs index edb2caa..2c3aa50 100644 --- a/src/app/sub.rs +++ b/src/app/sub.rs @@ -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