Skip to content

Commit 95d791e

Browse files
committed
feat: replace_inspector
1 parent 68703fd commit 95d791e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/evm.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,15 @@ where
112112
&mut self.inner.inspector
113113
}
114114

115+
/// Replace the current inspector with a new inspector of the same type.
116+
pub fn replace_inspector(mut self, inspector: Insp) -> Self
117+
where
118+
TrevmState: Copy,
119+
{
120+
*self.inspector_mut() = inspector;
121+
self
122+
}
123+
115124
/// Layer a new inspector on top of the current one.
116125
pub fn layer_inspector<Insp2>(
117126
self,

0 commit comments

Comments
 (0)