diff --git a/src/main.rs b/src/main.rs index 43abc1e..042cbf3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -124,14 +124,14 @@ mod rack { .entries .par_iter() .filter_map(|e| self.check_file(&e.path).ok()) - .filter(|mat| mat.matches.len() > 0) + .filter(|mat| !mat.matches.is_empty()) .collect::>(); self.matches.append(&mut results); Ok(()) } - fn should_ignore(&self, gitignore: &Vec, path: &str, entry: &DirEntry) -> bool { + fn should_ignore(&self, gitignore: &[String], path: &str, entry: &DirEntry) -> bool { if self.config.use_gitignore { let should_ignore = gitignore.iter().find(|&line| path.contains(&line.clone()));