Skip to content

Commit

Permalink
Ran cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Czabaniuk committed May 20, 2021
1 parent f039786 commit 7293524
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions ledger/benches/u8_vec_resize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vec<u8>> = (0..NUM_VECS)
.map(|_| {
vec![VAL; 500]
})
.collect();
let vecs: Vec<Vec<u8>> = (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<Vec<u8>> = (0..NUM_VECS)
.map(|_| {
vec![VAL; 500]
})
.collect();
let mut vecs: Vec<Vec<u8>> = (0..NUM_VECS).map(|_| vec![VAL; 500]).collect();
for i in 0..NUM_VECS {
vecs[i].resize(SHRED_PAYLOAD_SIZE, 0);
}
Expand Down

0 comments on commit 7293524

Please sign in to comment.