aboutsummaryrefslogtreecommitdiff
path: root/benches/rendering.rs
diff options
context:
space:
mode:
authorRuben Beltran del Rio <jj@r.bdr.sh>2025-12-16 16:35:08 +0100
committerRuben Beltran del Rio <jj@r.bdr.sh>2025-12-16 17:38:30 +0100
commitbf4b51af43005415deac6ba475992c83b5f2f82e (patch)
tree4bdc419138a070096735a45a74ea5eaf8822c691 /benches/rendering.rs
parentafd0794104228cd20e177f41dc68e9ae7ecaabda (diff)
Adapt to edition 2024
Diffstat (limited to 'benches/rendering.rs')
-rw-r--r--benches/rendering.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/benches/rendering.rs b/benches/rendering.rs
index 7fe7877..81b2e44 100644
--- a/benches/rendering.rs
+++ b/benches/rendering.rs
@@ -1,4 +1,5 @@
-use criterion::{Criterion, black_box, criterion_group, criterion_main};
+use criterion::{Criterion, criterion_group, criterion_main};
+use std::hint::black_box;
use std::fs;
use wmap_renderer::{Configuration, StageType, render_to_surface};
@@ -19,7 +20,7 @@ fn benchmark_rendering(c: &mut Criterion) {
StageType::default(),
&configuration,
)
- })
+ });
});
c.bench_function("render example map (no smart labels))", |b| {
b.iter(|| {
@@ -28,7 +29,7 @@ fn benchmark_rendering(c: &mut Criterion) {
StageType::default(),
&configuration_no_smart,
)
- })
+ });
});
let huge_source =
@@ -36,7 +37,7 @@ fn benchmark_rendering(c: &mut Criterion) {
let huge_map = wmap_parser::parse(&huge_source);
c.bench_function("render huge map", |b| {
- b.iter(|| render_to_surface(black_box(&huge_map), StageType::default(), &configuration))
+ b.iter(|| render_to_surface(black_box(&huge_map), StageType::default(), &configuration));
});
c.bench_function("render huge map", |b| {
b.iter(|| {
@@ -45,7 +46,7 @@ fn benchmark_rendering(c: &mut Criterion) {
StageType::default(),
&configuration_no_smart,
)
- })
+ });
});
}