Skip to content

Commit

Permalink
cmd: use "let Some(...) = ... else { ... }" to make the main logic ea…
Browse files Browse the repository at this point in the history
…sier to follow
  • Loading branch information
davvid committed Dec 20, 2024
1 parent 97e1a32 commit 935545e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@ pub(crate) fn initialize_threads(num_jobs: usize) -> anyhow::Result<()> {

/// Initialize the global thread pool when the num_jobs option is provided.
pub(crate) fn initialize_threads_option(num_jobs: Option<usize>) -> anyhow::Result<()> {
if let Some(num_jobs) = num_jobs {
initialize_threads(num_jobs)?;
}
let Some(num_jobs_value) = num_jobs else {
return Ok(());
};

Ok(())
initialize_threads(num_jobs_value)
}

0 comments on commit 935545e

Please sign in to comment.