File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ impl FilePattern {
161
161
162
162
// Add basename path.
163
163
if !pattern. contains ( std:: path:: MAIN_SEPARATOR ) {
164
- builder. add ( Glob :: from_str ( & pattern) ?) ;
164
+ builder. add ( Glob :: new ( & pattern) ?) ;
165
165
}
166
166
}
167
167
}
Original file line number Diff line number Diff line change @@ -547,15 +547,17 @@ fn is_file_excluded(
547
547
548
548
/// Return `true` if the given file should be ignored based on the exclusion
549
549
/// criteria.
550
+ #[ inline]
550
551
pub fn match_exclusion < P : AsRef < Path > , R : AsRef < Path > > (
551
552
file_path : P ,
552
553
file_basename : R ,
553
554
exclusion : & GlobSet ,
554
555
) -> bool {
555
- if exclusion. is_empty ( ) {
556
- return false ;
557
- }
558
- exclusion. is_match ( file_path) || exclusion. is_match ( file_basename)
556
+ match_candidate_exclusion (
557
+ & Candidate :: new ( file_path. as_ref ( ) ) ,
558
+ & Candidate :: new ( file_basename. as_ref ( ) ) ,
559
+ exclusion,
560
+ )
559
561
}
560
562
561
563
/// Return `true` if the given candidates should be ignored based on the exclusion
You can’t perform that action at this time.
0 commit comments