From 66f681452f1e15d795ba6f0088df61ed9b678c7c Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Mon, 27 Nov 2023 15:54:51 -0800 Subject: [PATCH] clippy: fix a nightly clippy warning --- cli/src/commands/run.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cli/src/commands/run.rs b/cli/src/commands/run.rs index 08af7ab0ed..c473b69e27 100644 --- a/cli/src/commands/run.rs +++ b/cli/src/commands/run.rs @@ -58,9 +58,7 @@ pub fn cmd_run(ui: &mut Ui, command: &CommandHelper, args: &RunArgs) -> Result<( let _jobs = match args.jobs { Some(0) => return Err(user_error("must pass at least one job")), Some(jobs) => Some(jobs), - None => std::thread::available_parallelism() - .ok() - .and_then(|t| t.try_into().ok()), + None => std::thread::available_parallelism().map(|t| t.into()).ok(), } // Fallback to a single user-visible job. .unwrap_or(1usize);