We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents da32606 + f9a8c02 commit f9a7541Copy full SHA for f9a7541
src/program.rs
@@ -97,8 +97,7 @@ impl CharRanges {
97
// This speeds up the `match_class_unicode` benchmark by checking
98
// some common cases quickly without binary search. e.g., Matching
99
// a Unicode class on predominantly ASCII text.
100
- for i in 0..cmp::min(self.ranges.len(), 4) {
101
- let r = self.ranges[i];
+ for (i, r) in self.ranges.iter().take(4).enumerate() {
102
if c < r.0 {
103
return None;
104
}
0 commit comments