From 42d6211bc27bf777d7825d651386a467ab8c598f Mon Sep 17 00:00:00 2001 From: Cameron Cordes Date: Mon, 15 Feb 2021 20:12:23 -0500 Subject: [PATCH] Fix warnings --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()));