Skip to content

Commit

Permalink
benches: fix build
Browse files Browse the repository at this point in the history
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
  • Loading branch information
Keruspe committed Jul 18, 2020
1 parent 0b9a141 commit ba249c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions benches/task_local.rs
Expand Up @@ -13,8 +13,10 @@ fn get(b: &mut Bencher) {
}

let mut sum = 0;
task::block_on(async {
b.iter(|| VAL.with(|v| sum += v));
b.iter(|| {
task::block_on(async move {
VAL.with(|v| sum += v);
})
});
black_box(sum);
}

0 comments on commit ba249c2

Please sign in to comment.