Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
rakita committed Apr 30, 2024
1 parent d0eb39a commit 00e117e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/revm/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ impl<EXT, DB: Database> Evm<'_, EXT, DB> {
.handler
.validation()
.initial_tx_gas(&self.context.evm.env)
.or_else(|err| {
.map_err(|e| {
self.clear();
Err(err)
e
})?;
let output = self.transact_preverified_inner(initial_gas_spend);
let output = self.handler.post_execution().end(&mut self.context, output);
Expand All @@ -136,9 +136,9 @@ impl<EXT, DB: Database> Evm<'_, EXT, DB> {
/// This function will validate the transaction.
#[inline]
pub fn transact(&mut self) -> EVMResult<DB::Error> {
let initial_gas_spend = self.preverify_transaction_inner().or_else(|e| {
let initial_gas_spend = self.preverify_transaction_inner().map_err(|e| {
self.clear();
Err(e)
e
})?;

let output = self.transact_preverified_inner(initial_gas_spend);
Expand Down

0 comments on commit 00e117e

Please sign in to comment.