From 6a3c6496fc2e707fe3e846469e2474d7a178e84f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marcos?= Date: Tue, 15 Jul 2025 16:53:55 -0300 Subject: [PATCH] Rename `--threads` to `--concurrency` And add alias to previous name --- src/cli/args.rs | 8 ++++---- src/commands/mod.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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()