Skip to content

Commit

Permalink
Code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannimirarchi420 committed Jul 22, 2024
1 parent cff2301 commit e309613
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,11 @@ impl CopyBuilder {
}
}

let mut include_filter_found = false;

for f in &self.include_filters {
if entry.path().to_string_lossy().contains(f) {
include_filter_found = true;
break;
}
}

if !include_filter_found && !self.include_filters.is_empty() {
if !self
.include_filters
.iter()
.any(|f| entry.path().to_string_lossy().contains(f))
{
continue 'files;
}

Expand Down

0 comments on commit e309613

Please sign in to comment.