Skip to content

Commit 4d8426b

Browse files
committed
use affirmative condition rather than negative one
1 parent 99da6be commit 4d8426b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,13 @@ impl Iterator for Paths {
383383
// advanced to the next pattern for this path
384384
idx = next + 1;
385385
}
386-
} else if next != self.dir_patterns.len() - 1 {
387-
// advanced to the next pattern for this path
388-
idx = next + 1;
389-
} else {
386+
} else if next == self.dir_patterns.len() - 1 {
390387
// not a directory and it's the last pattern, meaning no
391388
// match
392389
continue;
390+
} else {
391+
// advanced to the next pattern for this path
392+
idx = next + 1;
393393
}
394394
}
395395

0 commit comments

Comments
 (0)