about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--clippy_dev/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_dev/src/lib.rs b/clippy_dev/src/lib.rs
index 998efb142cc..a872ecf3feb 100644
--- a/clippy_dev/src/lib.rs
+++ b/clippy_dev/src/lib.rs
@@ -58,10 +58,10 @@ impl Lint {
 }
 
 pub fn gather_all() -> impl Iterator<Item=Lint> {
-    lint_files().flat_map(gather_from_file)
+    lint_files().flat_map(|f| gather_from_file(&f))
 }
 
-fn gather_from_file(dir_entry: fs::DirEntry) -> impl Iterator<Item=Lint> {
+fn gather_from_file(dir_entry: &fs::DirEntry) -> impl Iterator<Item=Lint> {
     let mut file = fs::File::open(dir_entry.path()).unwrap();
     let mut content = String::new();
     file.read_to_string(&mut content).unwrap();