From 2c21115c4e8f96f427fa2c8e738fb564ea023e49 Mon Sep 17 00:00:00 2001 From: Carl Date: Tue, 18 Dec 2018 23:57:53 -0800 Subject: [PATCH] fix benches --- benches/db_ledger.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/benches/db_ledger.rs b/benches/db_ledger.rs index 0afef34614e0c6..9e16fae4abb53d 100644 --- a/benches/db_ledger.rs +++ b/benches/db_ledger.rs @@ -161,7 +161,8 @@ fn bench_insert_data_blob_small(bench: &mut Bencher) { bench.iter(move || { for blob in blobs.iter_mut() { - db_ledger.insert_data_blobs(vec![blob]).unwrap(); + let index = blob.index().unwrap(); + db_ledger.insert_data_blobs(vec![*blob]).unwrap(); blob.set_index(index + num_entries as u64).unwrap(); } }); @@ -185,7 +186,8 @@ fn bench_insert_data_blob_big(bench: &mut Bencher) { bench.iter(move || { for blob in blobs.iter_mut() { - db_ledger.insert_data_blobs(vec![blob]).unwrap(); + let index = blob.index().unwrap(); + db_ledger.insert_data_blobs(vec![*blob]).unwrap(); blob.set_index(index + num_entries as u64).unwrap(); } });