Skip to content

Commit

Permalink
Fix benchmark reference which is immediately dereferenced
Browse files Browse the repository at this point in the history
  • Loading branch information
maneatingape committed May 26, 2024
1 parent 1b240a6 commit ca1ad54
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions benches/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ macro_rules! benchmark {
#[bench]
fn parse_bench(b: &mut Bencher) {
let data = load_once();
b.iter(|| parse(&data));
b.iter(|| parse(data));
}

#[bench]
fn part1_bench(b: &mut Bencher) {
let data = load_once();
let input = parse(&data);
let input = parse(data);
b.iter(|| part1(&input));
}

#[bench]
fn part2_bench(b: &mut Bencher) {
let data = load_once();
let input = parse(&data);
let input = parse(data);
b.iter(|| part2(&input));
}
}
Expand Down

0 comments on commit ca1ad54

Please sign in to comment.