File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -304,11 +304,11 @@ impl Pattern {
304
304
&& is_sep(prev_char.unwrap_or_default('/')))
305
305
};
306
306
307
- for ti in range(i, self.tokens.len() ) {
308
- match self.tokens[ti] {
307
+ for (ti, token) in self.tokens.slice_from(i).iter().enumerate( ) {
308
+ match *token {
309
309
AnySequence => {
310
310
loop {
311
- match self.matches_from(prev_char, file, ti + 1, options) {
311
+ match self.matches_from(prev_char, file, i + ti + 1, options) {
312
312
SubPatternDoesntMatch => (), // keep trying
313
313
m => return m,
314
314
}
@@ -331,7 +331,7 @@ impl Pattern {
331
331
}
332
332
333
333
let (c, next) = file.slice_shift_char();
334
- let matches = match self.tokens[ti] {
334
+ let matches = match *token {
335
335
AnyChar => {
336
336
!require_literal(c)
337
337
}
You can’t perform that action at this time.
0 commit comments