From c731648e77a0986b435b82177c8b3ffcd0714c9a Mon Sep 17 00:00:00 2001 From: The8472 Date: Sat, 30 Nov 2019 19:40:28 +0100 Subject: [PATCH] fix: bench didn't black_box its results --- library/alloc/benches/vec.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/alloc/benches/vec.rs b/library/alloc/benches/vec.rs index 1ae72a24709..39f67c664d4 100644 --- a/library/alloc/benches/vec.rs +++ b/library/alloc/benches/vec.rs @@ -643,9 +643,7 @@ fn bench_rev_1(b: &mut test::Bencher) { #[bench] fn bench_rev_2(b: &mut test::Bencher) { let data = black_box([0; LEN]); - b.iter(|| { - example_plain_slow(&data); - }); + b.iter(|| example_plain_slow(&data)); } #[bench]