diff --git a/src/nix/deployment/mod.rs b/src/nix/deployment/mod.rs index aba6ef3..7d04100 100644 --- a/src/nix/deployment/mod.rs +++ b/src/nix/deployment/mod.rs @@ -211,7 +211,7 @@ impl Deployment { -> ColmenaResult<()> { let eval_limit = self.evaluation_node_limit.get_limit() - .unwrap_or_else(|| self.targets.len()); + .unwrap_or(self.targets.len()); let mut futures = Vec::new(); @@ -246,7 +246,7 @@ impl Deployment { let futures = job.run(|job| async move { let mut evaluator = NixEvalJobs::default(); - let eval_limit = self.evaluation_node_limit.get_limit().unwrap_or_else(|| self.targets.len()); + let eval_limit = self.evaluation_node_limit.get_limit().unwrap_or(self.targets.len()); evaluator.set_eval_limit(eval_limit); evaluator.set_job(job.clone()); diff --git a/src/nix/host/ssh.rs b/src/nix/host/ssh.rs index 5908aa7..c20abe8 100644 --- a/src/nix/host/ssh.rs +++ b/src/nix/host/ssh.rs @@ -136,14 +136,10 @@ impl Host for Ssh { // Wait for node to come back up loop { - match self.get_boot_id().await { - Ok(new_id) => { - if new_id != old_id { - break; - } - } - Err(_) => { - // Ignore errors while waiting + // Ignore errors while waiting + if let Ok(new_id) = self.get_boot_id().await { + if new_id != old_id { + break; } }