From a87225519e6bd349f67180f2d862f600d437f420 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Tue, 31 Mar 2020 20:25:01 -0700 Subject: [PATCH] Silence cargo pedantry --- ofborg/src/nixenv.rs | 7 ++++--- ofborg/src/tasks/evaluate.rs | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ofborg/src/nixenv.rs b/ofborg/src/nixenv.rs index 64e568a..80afa98 100644 --- a/ofborg/src/nixenv.rs +++ b/ofborg/src/nixenv.rs @@ -37,11 +37,11 @@ impl HydraNixEnv { .lines() .collect::, _>>()? .into_iter() - .filter(|msg| msg.trim().len() > 0) + .filter(|msg| !msg.trim().is_empty()) .filter(|line| !nix::is_user_setting_warning(line)) .collect::>(); - if evaluation_errors.len() > 0 { + if !evaluation_errors.is_empty() { return Err(Error::UncleanEvaluation(evaluation_errors)); } @@ -100,7 +100,8 @@ impl HydraNixEnv { let (status, stdout, stderr) = self.nix.run_stderr_stdout(cmd); let stats = File::open(self.outpath_stats_path()); - return (status, stdout, stderr, stats); + + (status, stdout, stderr, stats) } } diff --git a/ofborg/src/tasks/evaluate.rs b/ofborg/src/tasks/evaluate.rs index 05f83d5..95a59b9 100644 --- a/ofborg/src/tasks/evaluate.rs +++ b/ofborg/src/tasks/evaluate.rs @@ -123,6 +123,7 @@ struct OneEval<'a, E> { } impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> { + #[allow(clippy::too_many_arguments)] fn new( client_app: &'a hubcaps::Github, client_legacy: &'a hubcaps::Github, @@ -233,7 +234,7 @@ impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> { } } - return self.actions().skip(&self.job); + self.actions().skip(&self.job) } fn evaluate_job(&mut self) -> Result {