aboutsummaryrefslogtreecommitdiff
path: root/bin/src
diff options
context:
space:
mode:
Diffstat (limited to 'bin/src')
-rw-r--r--bin/src/config.rs4
-rw-r--r--bin/src/fix.rs2
-rw-r--r--bin/src/fix/all.rs2
3 files changed, 4 insertions, 4 deletions
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<PathBuf>) -> Result<ReadOnlyVfs, ConfigErr> {
334 Ok(vfs) 334 Ok(vfs)
335} 335}
336 336
337fn lints(conf_path: &PathBuf) -> Result<LintMap, ConfigErr> { 337fn lints(conf_path: &Path) -> Result<LintMap, ConfigErr> {
338 let config_file = ConfFile::discover(conf_path)?; 338 let config_file = ConfFile::discover(conf_path)?;
339 Ok(utils::lint_map_of( 339 Ok(utils::lint_map_of(
340 (&*LINTS) 340 (&*LINTS)
341 .into_iter() 341 .iter()
342 .filter(|l| !config_file.disabled.iter().any(|check| check == l.name())) 342 .filter(|l| !config_file.disabled.iter().any(|check| check == l.name()))
343 .cloned() 343 .cloned()
344 .collect::<Vec<_>>() 344 .collect::<Vec<_>>()
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 {
100 text_diff 100 text_diff
101 .unified_diff() 101 .unified_diff()
102 .context_radius(4) 102 .context_radius(4)
103 .header(&old_file, &new_file) 103 .header(old_file, &new_file)
104 ); 104 );
105 } 105 }
106 (FixOut::Stream, single_result) => { 106 (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<Report>) -> Vec<Report> {
57impl<'a> Iterator for FixResult<'a> { 57impl<'a> Iterator for FixResult<'a> {
58 type Item = FixResult<'a>; 58 type Item = FixResult<'a>;
59 fn next(&mut self) -> Option<Self::Item> { 59 fn next(&mut self) -> Option<Self::Item> {
60 let all_reports = collect_fixes(&self.src, &self.lints).ok()?; 60 let all_reports = collect_fixes(&self.src, self.lints).ok()?;
61 if all_reports.is_empty() { 61 if all_reports.is_empty() {
62 return None; 62 return None;
63 } 63 }