Skip to content

Commit

Permalink
fix: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cchudant committed Sep 16, 2024
1 parent e64be00 commit 755034f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
8 changes: 2 additions & 6 deletions src/tests/transactional_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,7 @@ fn merge_with_uncommitted_remove() {

// remove pair2 but don't commit in transational state
bonsai_at_txn.remove(&identifier, &pair2.0).unwrap();
assert!(
!bonsai_at_txn.contains(&identifier, &pair2.0).unwrap()
);
assert!(!bonsai_at_txn.contains(&identifier, &pair2.0).unwrap());

let merge = bonsai_storage.merge(bonsai_at_txn);
match merge {
Expand All @@ -317,9 +315,7 @@ fn merge_with_uncommitted_remove() {
// commit after merge
bonsai_storage.commit(id_builder.new_id()).unwrap();

assert!(
!bonsai_storage.contains(&identifier, &pair2.0).unwrap()
);
assert!(!bonsai_storage.contains(&identifier, &pair2.0).unwrap());
}

#[test]
Expand Down
10 changes: 5 additions & 5 deletions src/trie/merkle_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1917,7 +1917,8 @@ mod tests {
),
];

let block_1 = [(
let block_1 = [
(
str_to_felt_bytes(
"0x06538fdd3aa353af8a87f5fe77d1f533ea82815076e30a86d65b72d3eb4f0b80",
),
Expand Down Expand Up @@ -2010,7 +2011,8 @@ mod tests {
),
),
],
)];
),
];

let block_2 = vec![
(
Expand Down Expand Up @@ -2096,9 +2098,7 @@ mod tests {
// (replacements are takent into account)
let mut storage_map = IndexMap::<ByteVec, IndexMap<Felt, Felt>>::new();
for (contract_address, storage) in blocks.clone() {
let map = storage_map
.entry((*contract_address).into())
.or_default();
let map = storage_map.entry((*contract_address).into()).or_default();

for (k, v) in storage {
let k = Felt::from_bytes_be_slice(k);
Expand Down

0 comments on commit 755034f

Please sign in to comment.