From c593b861a79ad2d1f393e5801089dffd5c7a21b3 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 22 Aug 2023 13:06:53 +0100 Subject: [PATCH] hashx_cachegrind: Fix black_box location --- crates/hashx/bench/benches/hashx_cachegrind.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/hashx/bench/benches/hashx_cachegrind.rs b/crates/hashx/bench/benches/hashx_cachegrind.rs index 224827660..b352c4af2 100644 --- a/crates/hashx/bench/benches/hashx_cachegrind.rs +++ b/crates/hashx/bench/benches/hashx_cachegrind.rs @@ -37,11 +37,11 @@ macro_rules! mk_c_equix { { $ctx:ident = $hashx_type:ident } => { macro_rules! bench_loop { { $loopvar:ident, $max:expr $(, $loopvar_map:ident )? => $eval:expr } => { - for raw_i in 0..$max { - let $loopvar = black_box(raw_i); + for $loopvar in 0..$max { $( let $loopvar = $loopvar_map($loopvar); )? + let $loopvar = black_box($loopvar); let _ = black_box($eval); } } }