Use is_empty instead of length > 0 #2

Merged
cameron merged 1 commits from feature/fix-clippy-warning into master 2020-06-17 19:01:39 +00:00
Showing only changes of commit c371dd1edd - Show all commits

View File

@@ -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;