@@ -3,7 +3,7 @@ use crate::{
33} ;
44use core:: convert:: Infallible ;
55use revm:: {
6- primitives :: { EVMError , ResultAndState } ,
6+ context :: result :: { EVMError , ResultAndState } ,
77 Database ,
88} ;
99use std:: format;
@@ -18,18 +18,18 @@ use std::format;
1818/// connector. E.g. the connector may contain some `Db` and the resulting Db may
1919/// contain `&Db`. This allows for (e.g.) shared caches between DBs on multiple
2020/// threads.
21- pub trait DbConnect < ' a > : Sync {
21+ pub trait DbConnect : Sync {
2222 /// The database type returned when connecting.
2323 type Database : Database ;
2424
2525 /// The error type returned when connecting to the database.
2626 type Error : core:: error:: Error ;
2727
2828 /// Connect to the database.
29- fn connect ( & ' a self ) -> Result < Self :: Database , Self :: Error > ;
29+ fn connect ( & self ) -> Result < Self :: Database , Self :: Error > ;
3030}
3131
32- impl < Db > DbConnect < ' _ > for Db
32+ impl < Db > DbConnect for Db
3333where
3434 Db : Database + Clone + Sync ,
3535{
@@ -44,28 +44,28 @@ where
4444
4545/// Trait for types that can create EVM instances.
4646///
47- /// Factories should contain configuration information like chain `EXT ` types,
48- /// and database connections. They are intended to enable parallel instantiation
47+ /// Factories should contain configuration information like `Insp ` types, and
48+ /// database connections. They are intended to enable parallel instantiation
4949/// of multiple EVMs in multiple threads sharing some configuration or backing
5050/// store.
5151///
5252/// The lifetime on this trait allows the resulting EVM to borrow from the
5353/// connector. E.g. the connector may contain some `Db` and the resulting EVM
5454/// may contain `&Db`. This allows for (e.g.) shared caches between EVMs on
5555/// multiple threads.
56- pub trait EvmFactory < ' a > : DbConnect < ' a > {
57- /// The `Ext ` type used in the resulting EVM.
58- type Ext : Sync ;
56+ pub trait EvmFactory : DbConnect {
57+ /// The `Insp ` type used in the resulting EVM.
58+ type Insp : Sync ;
5959
6060 /// Create a new EVM instance with the given database connection and
6161 /// extension.
62- fn create ( & ' a self ) -> Result < EvmNeedsCfg < ' a , Self :: Ext , Self :: Database > , Self :: Error > ;
62+ fn create ( & self ) -> Result < EvmNeedsCfg < Self :: Database , Self :: Insp > , Self :: Error > ;
6363
6464 /// Create a new EVM instance and parameterize it with a [`Cfg`].
6565 fn create_with_cfg < C > (
66- & ' a self ,
66+ & self ,
6767 cfg : & C ,
68- ) -> Result < EvmNeedsBlock < ' a , Self :: Ext , Self :: Database > , Self :: Error >
68+ ) -> Result < EvmNeedsBlock < Self :: Database , Self :: Insp > , Self :: Error >
6969 where
7070 C : Cfg ,
7171 {
@@ -75,10 +75,10 @@ pub trait EvmFactory<'a>: DbConnect<'a> {
7575 /// Create a new EVM instance and parameterize it with a [`Cfg`] and a
7676 /// [`Block`].
7777 fn create_with_block < C , B > (
78- & ' a self ,
78+ & self ,
7979 cfg : & C ,
8080 block : & B ,
81- ) -> Result < EvmNeedsTx < ' a , Self :: Ext , Self :: Database > , Self :: Error >
81+ ) -> Result < EvmNeedsTx < Self :: Database , Self :: Insp > , Self :: Error >
8282 where
8383 C : Cfg ,
8484 B : Block ,
@@ -89,11 +89,11 @@ pub trait EvmFactory<'a>: DbConnect<'a> {
8989 /// Create a new EVM instance, and parameterize it with a [`Cfg`], a
9090 /// [`Block`], and a [`Tx`], yielding an [`EvmReady`].
9191 fn create_with_tx < C , B , T > (
92- & ' a self ,
92+ & self ,
9393 cfg : & C ,
9494 block : & B ,
9595 tx : & T ,
96- ) -> Result < EvmReady < ' a , Self :: Ext , Self :: Database > , Self :: Error >
96+ ) -> Result < EvmReady < Self :: Database , Self :: Insp > , Self :: Error >
9797 where
9898 C : Cfg ,
9999 B : Block ,
@@ -107,15 +107,12 @@ pub trait EvmFactory<'a>: DbConnect<'a> {
107107 /// [`EvmTransacted`] or [`EvmErrored`].
108108 #[ allow( clippy:: type_complexity) ]
109109 fn transact < C , B , T > (
110- & ' a self ,
110+ & self ,
111111 cfg : & C ,
112112 block : & B ,
113113 tx : & T ,
114114 ) -> Result <
115- Result <
116- EvmTransacted < ' a , Self :: Ext , Self :: Database > ,
117- EvmErrored < ' a , Self :: Ext , Self :: Database > ,
118- > ,
115+ Result < EvmTransacted < Self :: Database , Self :: Insp > , EvmErrored < Self :: Database , Self :: Insp > > ,
119116 Self :: Error ,
120117 >
121118 where
@@ -130,7 +127,7 @@ pub trait EvmFactory<'a>: DbConnect<'a> {
130127 /// Run a transaction, take the [`ResultAndState`], and discard the Evm.
131128 /// This is a high-level shortcut function.
132129 fn run < C , B , T > (
133- & ' a self ,
130+ & self ,
134131 cfg : & C ,
135132 block : & B ,
136133 tx : & T ,
0 commit comments