Silence cargo pedantry

This commit is contained in:
Cole Helbling 2020-03-31 20:25:01 -07:00
parent c37b652882
commit a87225519e
No known key found for this signature in database
GPG key ID: B37E0F2371016A4C
2 changed files with 6 additions and 4 deletions

View file

@ -37,11 +37,11 @@ impl HydraNixEnv {
.lines() .lines()
.collect::<Result<Vec<String>, _>>()? .collect::<Result<Vec<String>, _>>()?
.into_iter() .into_iter()
.filter(|msg| msg.trim().len() > 0) .filter(|msg| !msg.trim().is_empty())
.filter(|line| !nix::is_user_setting_warning(line)) .filter(|line| !nix::is_user_setting_warning(line))
.collect::<Vec<String>>(); .collect::<Vec<String>>();
if evaluation_errors.len() > 0 { if !evaluation_errors.is_empty() {
return Err(Error::UncleanEvaluation(evaluation_errors)); return Err(Error::UncleanEvaluation(evaluation_errors));
} }
@ -100,7 +100,8 @@ impl HydraNixEnv {
let (status, stdout, stderr) = self.nix.run_stderr_stdout(cmd); let (status, stdout, stderr) = self.nix.run_stderr_stdout(cmd);
let stats = File::open(self.outpath_stats_path()); let stats = File::open(self.outpath_stats_path());
return (status, stdout, stderr, stats);
(status, stdout, stderr, stats)
} }
} }

View file

@ -123,6 +123,7 @@ struct OneEval<'a, E> {
} }
impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> { impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> {
#[allow(clippy::too_many_arguments)]
fn new( fn new(
client_app: &'a hubcaps::Github, client_app: &'a hubcaps::Github,
client_legacy: &'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<worker::Actions, EvalWorkerError> { fn evaluate_job(&mut self) -> Result<worker::Actions, EvalWorkerError> {