diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-02-24 20:03:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-24 20:03:12 -0500 |
commit | 3b12afd0723b288feb7c8c53ac3938a17fd0e57c (patch) | |
tree | 8ac398efaef6e59e3ab2278f378706aa44b5641e /cli/flags.rs | |
parent | c59152e4000393ad122855c26198c1d942497c00 (diff) |
chore: upgrade to Rust 1.59 (#13767)
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() |