We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f883159 + 39ce095 commit 12bca20Copy full SHA for 12bca20
src/libextra/glob.rs
@@ -304,11 +304,11 @@ impl Pattern {
304
&& is_sep(prev_char.unwrap_or_default('/')))
305
};
306
307
- for ti in range(i, self.tokens.len()) {
308
- match self.tokens[ti] {
+ for (ti, token) in self.tokens.slice_from(i).iter().enumerate() {
+ match *token {
309
AnySequence => {
310
loop {
311
- match self.matches_from(prev_char, file, ti + 1, options) {
+ match self.matches_from(prev_char, file, i + ti + 1, options) {
312
SubPatternDoesntMatch => (), // keep trying
313
m => return m,
314
}
@@ -331,7 +331,7 @@ impl Pattern {
331
332
333
let (c, next) = file.slice_shift_char();
334
- let matches = match self.tokens[ti] {
+ let matches = match *token {
335
AnyChar => {
336
!require_literal(c)
337
0 commit comments