Skip to content

Commit d8fd92f

Browse files
authored
chore: add Precompil::into_precompile (#2913)
1 parent 191fa78 commit d8fd92f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/precompile/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,12 @@ impl Precompile {
363363
&self.fn_
364364
}
365365

366+
/// Consumes the type and returns the precompile implementation.
367+
#[inline]
368+
pub fn into_precompile(self) -> PrecompileFn {
369+
self.fn_
370+
}
371+
366372
/// Executes the precompile.
367373
#[inline]
368374
pub fn execute(&self, input: &[u8], gas_limit: u64) -> PrecompileResult {

0 commit comments

Comments
 (0)