From 269c649b1ac7566fbc30b78891f59aefde173f5f Mon Sep 17 00:00:00 2001 From: Alexey Shekhirin Date: Wed, 17 Jul 2024 15:19:23 +0100 Subject: [PATCH] chore(evm): remove unneeded lifetimes (#9583) --- crates/evm/src/lib.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/crates/evm/src/lib.rs b/crates/evm/src/lib.rs index 445d9625f8..27eeb42ec4 100644 --- a/crates/evm/src/lib.rs +++ b/crates/evm/src/lib.rs @@ -42,17 +42,14 @@ pub trait ConfigureEvm: ConfigureEvmEnv { /// This does not automatically configure the EVM with [`ConfigureEvmEnv`] methods. It is up to /// the caller to call an appropriate method to fill the transaction and block environment /// before executing any transactions using the provided EVM. - fn evm<'a, DB: Database + 'a>( - &'a self, - db: DB, - ) -> Evm<'a, Self::DefaultExternalContext<'a>, DB>; + fn evm<'a, DB: Database + 'a>(&self, db: DB) -> Evm<'a, Self::DefaultExternalContext<'a>, DB>; /// Returns a new EVM with the given database configured with the given environment settings, /// including the spec id. /// /// This will preserve any handler modifications fn evm_with_env<'a, DB: Database + 'a>( - &'a self, + &self, db: DB, env: EnvWithHandlerCfg, ) -> Evm<'a, Self::DefaultExternalContext<'a>, DB> { @@ -69,13 +66,13 @@ pub trait ConfigureEvm: ConfigureEvmEnv { /// /// This will preserve any handler modifications fn evm_with_env_and_inspector<'a, DB, I>( - &'a self, + &self, db: DB, env: EnvWithHandlerCfg, inspector: I, ) -> Evm<'a, I, DB> where - DB: Database + 'a, + DB: Database, I: GetInspector, { let mut evm = self.evm_with_inspector(db, inspector); @@ -89,7 +86,7 @@ pub trait ConfigureEvm: ConfigureEvmEnv { /// Caution: This does not automatically configure the EVM with [`ConfigureEvmEnv`] methods. It /// is up to the caller to call an appropriate method to fill the transaction and block /// environment before executing any transactions using the provided EVM. - fn evm_with_inspector<'a, DB, I>(&'a self, db: DB, inspector: I) -> Evm<'a, I, DB> + fn evm_with_inspector<'a, DB, I>(&self, db: DB, inspector: I) -> Evm<'a, I, DB> where DB: Database + 'a, I: GetInspector,