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 {
304304 && is_sep(prev_char.unwrap_or_default('/')))
305305 };
306306
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 {
309309 AnySequence => {
310310 loop {
311- match self.matches_from(prev_char, file, ti + 1, options) {
311+ match self.matches_from(prev_char, file, i + ti + 1, options) {
312312 SubPatternDoesntMatch => (), // keep trying
313313 m => return m,
314314 }
@@ -331,7 +331,7 @@ impl Pattern {
331331 }
332332
333333 let (c, next) = file.slice_shift_char();
334- let matches = match self.tokens[ti] {
334+ let matches = match *token {
335335 AnyChar => {
336336 !require_literal(c)
337337 }
You can’t perform that action at this time.
0 commit comments