Skip to content

Commit

Permalink
fix: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
elfedy committed Oct 31, 2024
1 parent 2915b7f commit 0f584c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/cheatcodes/src/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ pub trait CheatcodesExecutor {
// regards to the inspector's lifetime.
let mut ecx_inner = EvmContext {
inner: InnerEvmContext {
env: std::mem::replace(&mut ecx.env, Default::default()),
env: std::mem::take(&mut ecx.env),
journaled_state: std::mem::replace(
&mut ecx.journaled_state,
revm::JournaledState::new(Default::default(), Default::default()),
Expand All @@ -174,7 +174,7 @@ pub trait CheatcodesExecutor {
inspector.trace_zksync(&mut ecx_inner, call_traces);

// re-apply the modified fields to the original ecx.
let env = std::mem::replace(&mut ecx_inner.env, Default::default());
let env = std::mem::take(&mut ecx_inner.env);
let journaled_state = std::mem::replace(
&mut ecx_inner.journaled_state,
revm::JournaledState::new(Default::default(), Default::default()),
Expand Down
2 changes: 1 addition & 1 deletion crates/cheatcodes/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl Cheatcode for zkUsePaymasterCall {
}

impl Cheatcode for zkUseFactoryDepCall {
fn apply_stateful<DB: DatabaseExt>(&self, ccx: &mut CheatsCtxt<DB>) -> Result {
fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result {
let Self { name } = self;
info!("Adding factory dependency: {:?}", name);
ccx.state.zk_use_factory_deps.push(name.clone());
Expand Down
2 changes: 1 addition & 1 deletion crates/evm/evm/src/executors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ impl Executor {
let mut result = convert_executed_result(
env,
inspector,
result_and_state.clone(),
result_and_state,
backend.has_state_snapshot_failure(),
)?;

Expand Down

0 comments on commit 0f584c3

Please sign in to comment.