Skip to content

Commit

Permalink
fix: Missed &mut on the benchmarks module
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRustifyer committed May 30, 2024
1 parent c523df8 commit 17b7321
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zork++/benches/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ pub fn build_project_benchmark(c: &mut Criterion) {
config_file::zork_cfg_from_file(utils::constants::CONFIG_FILE_MOCK).unwrap();
let cli_args = CliArgs::parse();
let program_data = build_model(&config, &cli_args, Path::new(".")).unwrap();
let cache = ZorkCache::default();
let mut cache = ZorkCache::default();

c.bench_function("Build project", |b| {
b.iter(|| build_project(black_box(&program_data), black_box(&cache), false))
b.iter(|| build_project(black_box(&program_data), black_box(&mut cache), false))
});

c.bench_function("Cache loading time", |b| {
Expand Down

0 comments on commit 17b7321

Please sign in to comment.