diff options
Diffstat (limited to 'cli/flags.rs')
-rw-r--r-- | cli/flags.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/flags.rs b/cli/flags.rs index ab8153c4e..316425247 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -2232,8 +2232,8 @@ fn test_parse(flags: &mut Flags, matches: &clap::ArgMatches) { if let Some(value) = matches.value_of("jobs") { value.parse().unwrap() } else { - // TODO(caspervonb) drop the dependency on num_cpus when https://doc.rust-lang.org/std/thread/fn.available_concurrency.html becomes stable. - NonZeroUsize::new(num_cpus::get()).unwrap() + std::thread::available_parallelism() + .unwrap_or(NonZeroUsize::new(1).unwrap()) } } else { NonZeroUsize::new(1).unwrap() |