Skip to content

Commit f9a7541

Browse files
committed
Merge pull request #113 from SeanRBurton/master
tiny refactoring.
2 parents da32606 + f9a8c02 commit f9a7541

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/program.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ impl CharRanges {
9797
// This speeds up the `match_class_unicode` benchmark by checking
9898
// some common cases quickly without binary search. e.g., Matching
9999
// a Unicode class on predominantly ASCII text.
100-
for i in 0..cmp::min(self.ranges.len(), 4) {
101-
let r = self.ranges[i];
100+
for (i, r) in self.ranges.iter().take(4).enumerate() {
102101
if c < r.0 {
103102
return None;
104103
}

0 commit comments

Comments
 (0)