Skip to content

Commit

Permalink
self review
Browse files Browse the repository at this point in the history
  • Loading branch information
jpgonzalezra committed Jun 14, 2024
1 parent 824e33f commit 20e46ee
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions crates/revm/src/db/states/bundle_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,7 @@ impl BundleBuilder {
storage: &mut HashMap<U256, (U256, U256)>,
) -> Self {
self.states.insert(address);
let entry = self
.state_storage
.entry(address)
.or_insert_with(HashMap::new);
let entry = self.state_storage.entry(address).or_default();
entry.extend(storage.drain());
self
}
Expand Down Expand Up @@ -152,8 +149,8 @@ impl BundleBuilder {
let entry = self
.revert_storage
.entry((block_number, address))
.or_insert_with(Vec::new);
entry.extend(storage.drain(..));
.or_default();
entry.append(storage);
self
}

Expand Down

0 comments on commit 20e46ee

Please sign in to comment.