diff options
author | Casper Beyer <caspervonb@pm.me> | 2021-04-30 20:57:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-30 08:57:42 -0400 |
commit | f31ee8d1bfc50de6cef5b746f6fd6431b7b772e5 (patch) | |
tree | db50356945325ee93248795da46d29a095f03e32 /cli/flags.rs | |
parent | 4e6790a5fadff58d941916a90b78b43d9ab877aa (diff) |
fix(test): default to num cpus when no value is given (#10443)
Diffstat (limited to 'cli/flags.rs')
-rw-r--r-- | cli/flags.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/flags.rs b/cli/flags.rs index 3e63f8014..0c916ecb8 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -1683,9 +1683,8 @@ fn test_parse(flags: &mut Flags, matches: &clap::ArgMatches) { if let Some(value) = matches.value_of("jobs") { value.parse().unwrap() } else { - // TODO(caspervonb) when no value is given use - // https://doc.rust-lang.org/std/thread/fn.available_concurrency.html - 2 + // TODO(caspervonb) drop the dependency on num_cpus when https://doc.rust-lang.org/std/thread/fn.available_concurrency.html becomes stable. + num_cpus::get() } } else { 1 |