File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -83,11 +83,11 @@ impl Directories {
83
83
self . includes_path ( path)
84
84
}
85
85
fn includes_path ( & self , path : & AbsPath ) -> bool {
86
- let mut include = None ;
86
+ let mut include: Option < & AbsPathBuf > = None ;
87
87
for incl in & self . include {
88
- if is_prefix ( incl, path ) {
88
+ if path . starts_with ( incl) {
89
89
include = Some ( match include {
90
- Some ( prev) if is_prefix ( incl, prev ) => prev,
90
+ Some ( prev) if prev . starts_with ( incl) => prev,
91
91
_ => incl,
92
92
} )
93
93
}
@@ -97,15 +97,11 @@ impl Directories {
97
97
None => return false ,
98
98
} ;
99
99
for excl in & self . exclude {
100
- if is_prefix ( excl, path ) && is_prefix ( include, excl ) {
100
+ if path . starts_with ( excl) && excl . starts_with ( include) {
101
101
return false ;
102
102
}
103
103
}
104
- return true ;
105
-
106
- fn is_prefix ( short : & AbsPath , long : & AbsPath ) -> bool {
107
- long. strip_prefix ( short) . is_some ( )
108
- }
104
+ true
109
105
}
110
106
}
111
107
You can’t perform that action at this time.
0 commit comments