diff --git a/crates/core/src/node/debug.rs b/crates/core/src/node/debug.rs index 344b6f1a..2fe812b1 100644 --- a/crates/core/src/node/debug.rs +++ b/crates/core/src/node/debug.rs @@ -89,7 +89,7 @@ impl InMemoryNode { let allow_no_target = system_contracts.evm_emulator.is_some(); let mut l2_tx = L2Tx::from_request(request.into(), MAX_TX_SIZE, allow_no_target) - .map_err(|err| Web3Error::SerializationError(err))?; + .map_err(Web3Error::SerializationError)?; let execution_mode = zksync_multivm::interface::TxExecutionMode::EthCall; let storage = StorageView::new(&inner.fork_storage).into_rc_ptr(); diff --git a/crates/core/src/node/eth.rs b/crates/core/src/node/eth.rs index 6428573f..e6a99934 100644 --- a/crates/core/src/node/eth.rs +++ b/crates/core/src/node/eth.rs @@ -475,27 +475,24 @@ impl InMemoryNode { } }) } - Ok(self - .write_inner()? + self.write_inner()? .filters .add_log_filter(from_block, to_block, addresses, topics) - .map_err(anyhow::Error::msg)?) + .map_err(anyhow::Error::msg) } pub async fn new_block_filter_impl(&self) -> anyhow::Result { - Ok(self - .write_inner()? + self.write_inner()? .filters .add_block_filter() - .map_err(anyhow::Error::msg)?) + .map_err(anyhow::Error::msg) } pub async fn new_pending_transaction_filter_impl(&self) -> anyhow::Result { - Ok(self - .write_inner()? + self.write_inner()? .filters .add_pending_transaction_filter() - .map_err(anyhow::Error::msg)?) + .map_err(anyhow::Error::msg) } pub async fn uninstall_filter_impl(&self, id: U256) -> anyhow::Result { @@ -568,11 +565,10 @@ impl InMemoryNode { } pub async fn get_filter_changes_impl(&self, id: U256) -> anyhow::Result { - Ok(self - .write_inner()? + self.write_inner()? .filters .get_new_changes(id) - .map_err(anyhow::Error::msg)?) + .map_err(anyhow::Error::msg) } pub async fn get_block_transaction_count_by_number_impl( diff --git a/crates/core/src/node/in_memory.rs b/crates/core/src/node/in_memory.rs index 95fe3d8e..f469ec0f 100644 --- a/crates/core/src/node/in_memory.rs +++ b/crates/core/src/node/in_memory.rs @@ -502,7 +502,7 @@ impl InMemoryNodeInner { MAX_TX_SIZE, allow_no_target, ) - .map_err(|err| Web3Error::SerializationError(err))?; + .map_err(Web3Error::SerializationError)?; let tx: Transaction = l2_tx.clone().into();