Merge pull request 'Use is_empty instead of length > 0' (#2) from feature/fix-clippy-warning into master
All checks were successful
Core Repos/Rack/pipeline/head This commit looks good

Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
2020-06-17 19:01:39 +00:00

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;