Skip to content

Commit

Permalink
perf: rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cchudant committed Apr 3, 2024
1 parent c9fe20b commit b146e15
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
20 changes: 15 additions & 5 deletions benches/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,21 @@ fn five_updates(c: &mut Criterion) {
b.iter_batched(
|| bonsai_storage.clone(),
|mut bonsai_storage| {
bonsai_storage.insert(&[], &BitVec::from_vec(vec![0, 1, 2, 3, 4, 5]), &felt).unwrap();
bonsai_storage.insert(&[], &BitVec::from_vec(vec![0, 2, 2, 5, 4, 5]), &felt).unwrap();
bonsai_storage.insert(&[], &BitVec::from_vec(vec![0, 1, 2, 3, 3, 5]), &felt).unwrap();
bonsai_storage.insert(&[], &BitVec::from_vec(vec![0, 1, 1, 3, 99, 3]), &felt).unwrap();
bonsai_storage.insert(&[], &BitVec::from_vec(vec![0, 1, 2, 3, 4, 6]), &felt).unwrap();
bonsai_storage
.insert(&[], &BitVec::from_vec(vec![0, 1, 2, 3, 4, 5]), &felt)
.unwrap();
bonsai_storage
.insert(&[], &BitVec::from_vec(vec![0, 2, 2, 5, 4, 5]), &felt)
.unwrap();
bonsai_storage
.insert(&[], &BitVec::from_vec(vec![0, 1, 2, 3, 3, 5]), &felt)
.unwrap();
bonsai_storage
.insert(&[], &BitVec::from_vec(vec![0, 1, 1, 3, 99, 3]), &felt)
.unwrap();
bonsai_storage
.insert(&[], &BitVec::from_vec(vec![0, 1, 2, 3, 4, 6]), &felt)
.unwrap();
bonsai_storage.commit(id_builder.new_id()).unwrap();
},
criterion::BatchSize::LargeInput,
Expand Down
2 changes: 1 addition & 1 deletion src/trie/merkle_tree.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[cfg(not(feature = "std"))]
use alloc::{format, string::ToString, vec::Vec, vec};
use alloc::{format, string::ToString, vec, vec::Vec};
use bitvec::{
prelude::{BitSlice, BitVec, Msb0},
view::BitView,
Expand Down

0 comments on commit b146e15

Please sign in to comment.