diff --git a/src/lib.rs b/src/lib.rs index 097fab2..e2d5d70 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -275,10 +275,12 @@ impl CopyBuilder { } } - for f in &self.include_filters { - if !entry.path().to_string_lossy().contains(f) { - continue 'files; - } + if !self + .include_filters + .iter() + .any(|f| entry.path().to_string_lossy().contains(f)) + { + continue 'files; } // File is not present: copy it in any case