Skip to content

Commit ba249c2

Browse files
committed
benches: fix build
Signed-off-by: Marc-Antoine Perennou <[email protected]>
1 parent 0b9a141 commit ba249c2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: benches/task_local.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ fn get(b: &mut Bencher) {
1313
}
1414

1515
let mut sum = 0;
16-
task::block_on(async {
17-
b.iter(|| VAL.with(|v| sum += v));
16+
b.iter(|| {
17+
task::block_on(async move {
18+
VAL.with(|v| sum += v);
19+
})
1820
});
1921
black_box(sum);
2022
}

0 commit comments

Comments
 (0)