Use is_empty instead of length > 0 #2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user