Skip to content

Commit 20d3fb0

Browse files
committed
feat: make include works
1 parent bf912b8 commit 20d3fb0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/file_filter.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@ pub fn filter_by_packages(path: PathBuf, packages: &Vec<String>) -> bool {
5151
return true;
5252
}
5353

54+
let mut include_package = false;
5455
for child in path.iter() {
55-
return match child.to_str() {
56-
None => { false }
57-
Some(sub) => {
58-
packages.contains(&sub.to_string())
56+
if let Some(sub) = child.to_str() {
57+
if packages.contains(&sub.to_string()) {
58+
include_package = true;
5959
}
6060
}
6161
}
6262

63-
return false;
63+
return include_package;
6464
}
6565

6666
pub fn filter_by_suffix(path: PathBuf, suffixes: &Vec<String>) -> bool {

0 commit comments

Comments
 (0)