Skip to content

Commit d15ec9c

Browse files
author
Tim Kuehn
committed
---
yaml --- r: 79206 b: refs/heads/master c: 39ce095 h: refs/heads/master v: v3
1 parent da73ef6 commit d15ec9c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: f883159cdf3a84967513dfb27f004499ac456a1a
2+
refs/heads/master: 39ce095ebdfcfb35f93b386bcf5a6f0586f78611
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 60fba4d7d677ec098e6a43014132fe99f7547363
55
refs/heads/try: 4ca1f28cbf6a924013a43617b53c9fa0b97311a6

trunk/src/libextra/glob.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)