Skip to content

Commit

Permalink
perf: touch up flatten_contracts (#7092)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Feb 12, 2024
1 parent 74b12ee commit 1f19d3c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions crates/common/src/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,9 @@ pub fn flatten_contracts(
contracts
.iter()
.filter_map(|(id, c)| {
let bytecode = if deployed_code {
c.deployed_bytecode.clone().into_bytes()
} else {
c.bytecode.clone().into_bytes()
};
bytecode.map(|bytecode| (id.clone(), (c.abi.clone(), bytecode.into())))
let bytecode =
if deployed_code { c.deployed_bytecode.bytes() } else { c.bytecode.bytes() };
bytecode.cloned().map(|code| (id.clone(), (c.abi.clone(), code.into())))
})
.collect(),
)
Expand Down

0 comments on commit 1f19d3c

Please sign in to comment.