File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -36,16 +36,19 @@ fn on_skip_list(entry: &DirEntry) -> bool {
36
36
. map ( |s| FILES_TO_SKIP_ALWAYS . is_match ( s) || s == "private" )
37
37
. unwrap_or_default ( ) ;
38
38
39
- // check if the current entry is a file in a "test" directory that contains "Hidden " in its name
39
+ // check if the current entry is a file that contains "Hidden" in its name in a directory that contains "test " in its name
40
40
let hidden_in_test = if entry. path ( ) . is_file ( ) {
41
- if let Some ( parent) = entry. path ( ) . parent ( ) . and_then ( |p| p. file_name ( ) ) {
42
- parent == "test"
43
- && entry_file_name
44
- . map ( |n| n. contains ( "Hidden" ) )
45
- . unwrap_or_default ( )
46
- } else {
47
- false
48
- }
41
+ let in_test = entry
42
+ . path ( )
43
+ . parent ( )
44
+ . and_then ( |p| p. file_name ( ) )
45
+ . and_then ( |f| f. to_str ( ) )
46
+ . map ( |f| f. contains ( "test" ) )
47
+ . unwrap_or_default ( ) ;
48
+ let contains_hidden = entry_file_name
49
+ . map ( |n| n. contains ( "Hidden" ) )
50
+ . unwrap_or_default ( ) ;
51
+ in_test && contains_hidden
49
52
} else {
50
53
false
51
54
} ;
You can’t perform that action at this time.
0 commit comments