diff --git a/src/cli/args.rs b/src/cli/args.rs index b756df5..68e3854 100644 --- a/src/cli/args.rs +++ b/src/cli/args.rs @@ -45,9 +45,9 @@ pub struct CliArgs { #[arg(short = 'p', long = "password", global = true)] pub password: Option, - /// Concurrent working threads - #[arg(short = 'c', long, global = true)] - pub threads: Option, + /// Limit the amount of concurrent threads available + #[arg(short, long, visible_alias = "threads", global = true)] + pub concurrency: Option, // Ouch and claps subcommands #[command(subcommand)] @@ -154,7 +154,7 @@ mod tests { format: None, // This is usually replaced in assertion tests password: None, - threads: None, + concurrency: None, cmd: Subcommand::Decompress { // Put a crazy value here so no test can assert it unintentionally files: vec!["\x00\x11\x22".into()], diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 4a81d85..7204328 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -54,7 +54,7 @@ pub fn run( question_policy: QuestionPolicy, file_visibility_policy: FileVisibilityPolicy, ) -> crate::Result<()> { - if let Some(threads) = args.threads { + if let Some(threads) = args.concurrency { rayon::ThreadPoolBuilder::new() .num_threads(threads) .build_global()