From 17cd6e78cc186b77efc1f3fcba661f94b04ddf7c Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Wed, 30 Oct 2024 19:28:46 +0100 Subject: [PATCH] inline env and l1_block_info fields --- crates/cheatcodes/src/inspector.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/cheatcodes/src/inspector.rs b/crates/cheatcodes/src/inspector.rs index 70b93cf86..6cfd4e13a 100644 --- a/crates/cheatcodes/src/inspector.rs +++ b/crates/cheatcodes/src/inspector.rs @@ -158,8 +158,6 @@ pub trait CheatcodesExecutor { // We recreate the EvmContext here to satisfy the lifetime parameters as 'static, with // regards to the inspector's lifetime. - let error = std::mem::replace(&mut ecx.error, Ok(())); - let l1_block_info = std::mem::take(&mut ecx.l1_block_info); let mut ecx_inner = EvmContext { inner: InnerEvmContext { env: std::mem::replace(&mut ecx.env, Default::default()), @@ -167,9 +165,9 @@ pub trait CheatcodesExecutor { &mut ecx.journaled_state, revm::JournaledState::new(Default::default(), Default::default()), ), + error: std::mem::replace(&mut ecx.error, Ok(())), + l1_block_info: std::mem::take(&mut ecx.l1_block_info), db: &mut ecx.db as &mut dyn DatabaseExt, - error, - l1_block_info, }, precompiles: Default::default(), };