From c371dd1edd329a27edc6e851c28ed0d460d04215 Mon Sep 17 00:00:00 2001 From: Cameron Cordes Date: Wed, 17 Jun 2020 14:34:41 -0400 Subject: [PATCH] Use is_empty instead of length > 0 --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 968e25b..bbb6d8d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,7 +61,7 @@ fn traverse_dir( if config.use_gitignore { let should_ignore = gitignore.iter().find(|&line| path.contains(&line.clone())); - if should_ignore.unwrap_or(&String::from("")).len() > 0 + if !should_ignore.unwrap_or(&String::from("")).is_empty() || entry.path().to_str().unwrap().contains("/.git") { continue; -- 2.49.1