From 1079486539d44b2e70c623fb4948d6e0b9b11812 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 28 Nov 2021 19:25:36 +0530 Subject: remove lint: unquoted_splice --- bin/src/config.rs | 4 ++-- bin/src/fix.rs | 2 +- bin/src/fix/all.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/src/config.rs b/bin/src/config.rs index b6310e6..572ddde 100644 --- a/bin/src/config.rs +++ b/bin/src/config.rs @@ -334,11 +334,11 @@ fn vfs(files: Vec) -> Result { Ok(vfs) } -fn lints(conf_path: &PathBuf) -> Result { +fn lints(conf_path: &Path) -> Result { let config_file = ConfFile::discover(conf_path)?; Ok(utils::lint_map_of( (&*LINTS) - .into_iter() + .iter() .filter(|l| !config_file.disabled.iter().any(|check| check == l.name())) .cloned() .collect::>() diff --git a/bin/src/fix.rs b/bin/src/fix.rs index 4268567..a035379 100644 --- a/bin/src/fix.rs +++ b/bin/src/fix.rs @@ -100,7 +100,7 @@ pub mod main { text_diff .unified_diff() .context_radius(4) - .header(&old_file, &new_file) + .header(old_file, &new_file) ); } (FixOut::Stream, single_result) => { diff --git a/bin/src/fix/all.rs b/bin/src/fix/all.rs index bbc39e8..7e51d16 100644 --- a/bin/src/fix/all.rs +++ b/bin/src/fix/all.rs @@ -57,7 +57,7 @@ fn reorder(mut reports: Vec) -> Vec { impl<'a> Iterator for FixResult<'a> { type Item = FixResult<'a>; fn next(&mut self) -> Option { - let all_reports = collect_fixes(&self.src, &self.lints).ok()?; + let all_reports = collect_fixes(&self.src, self.lints).ok()?; if all_reports.is_empty() { return None; } -- cgit v1.2.3