diff --git a/ledger/benches/u8_vec_resize.rs b/ledger/benches/u8_vec_resize.rs index 2ec509d532f985..0fdac1af131976 100644 --- a/ledger/benches/u8_vec_resize.rs +++ b/ledger/benches/u8_vec_resize.rs @@ -70,22 +70,14 @@ fn bench_allocate_and_resize_vec_1000(bencher: &mut Bencher) { #[bench] fn bench_allocate_1000_vec_500(bencher: &mut Bencher) { bencher.iter(|| { - let vecs: Vec> = (0..NUM_VECS) - .map(|_| { - vec![VAL; 500] - }) - .collect(); + let vecs: Vec> = (0..NUM_VECS).map(|_| vec![VAL; 500]).collect(); }); } #[bench] fn bench_allocate_and_resize_1000_vec_500(bencher: &mut Bencher) { bencher.iter(|| { - let mut vecs: Vec> = (0..NUM_VECS) - .map(|_| { - vec![VAL; 500] - }) - .collect(); + let mut vecs: Vec> = (0..NUM_VECS).map(|_| vec![VAL; 500]).collect(); for i in 0..NUM_VECS { vecs[i].resize(SHRED_PAYLOAD_SIZE, 0); }