From 13cd3083583c48252a53b260bb89b693170824b4 Mon Sep 17 00:00:00 2001 From: asonix Date: Sun, 20 Nov 2022 12:09:17 -0600 Subject: [PATCH] clippy --- src/jobs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jobs.rs b/src/jobs.rs index 073dca8..296c641 100644 --- a/src/jobs.rs +++ b/src/jobs.rs @@ -45,7 +45,7 @@ pub(crate) fn create_workers( config: Config, ) -> (Manager, JobServer) { let parallelism = - std::thread::available_parallelism().unwrap_or(NonZeroUsize::try_from(1).expect("nonzero")); + std::thread::available_parallelism().unwrap_or_else(|_| NonZeroUsize::try_from(1).expect("nonzero")); let shared = WorkerConfig::new_managed(Storage::new(ActixTimer), move |queue_handle| { JobState::new(