Skip to content

Commit 49954f8

Browse files
committed
Fix benchmark.
(This was including the compilation of a regex in the benchmark!)
1 parent 1e79c4d commit 49954f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

regex_macros/benches/bench.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ macro_rules! throughput(
145145
fn $name(b: &mut Bencher) {
146146
let text = gen_text($size);
147147
b.bytes = $size;
148-
b.iter(|| if $regex.is_match(&text) { panic!("match") });
148+
let re = $regex;
149+
b.iter(|| if re.is_match(&text) { panic!("match") });
149150
}
150151
);
151152
);

0 commit comments

Comments
 (0)