diff --git a/host/src/util/mpt.rs b/host/src/util/mpt.rs index 516595f8..91117918 100644 --- a/host/src/util/mpt.rs +++ b/host/src/util/mpt.rs @@ -75,7 +75,7 @@ pub fn is_not_included(key: &[u8], proof_nodes: &[MptNode]) -> Result { // for valid proofs, the get must not fail let value = proof_trie .get(key) - .map_err(|e| Into::::into(e)) + .map_err(Into::::into) .context("invalid trie")?; Ok(value.is_none()) diff --git a/lib/src/builder/execute/ethereum.rs b/lib/src/builder/execute/ethereum.rs index b1b9df4a..eab3f3c3 100644 --- a/lib/src/builder/execute/ethereum.rs +++ b/lib/src/builder/execute/ethereum.rs @@ -163,11 +163,11 @@ impl TxExecStrategy for EthTxExecStrategy { let trie_key = tx_no.to_rlp(); tx_trie .insert_rlp(&trie_key, tx) - .map_err(|e| Into::::into(e)) + .map_err(Into::::into) .context("failed to insert transaction")?; receipt_trie .insert_rlp(&trie_key, receipt) - .map_err(|e| Into::::into(e)) + .map_err(Into::::into) .context("failed to insert receipt")?; // update account states @@ -225,7 +225,7 @@ impl TxExecStrategy for EthTxExecStrategy { // Add withdrawal to trie withdrawals_trie .insert_rlp(&i.to_rlp(), withdrawal) - .map_err(|e| Into::::into(e)) + .map_err(Into::::into) .context("failed to insert withdrawal")?; } diff --git a/lib/src/builder/execute/optimism.rs b/lib/src/builder/execute/optimism.rs index 222419d5..873a910e 100644 --- a/lib/src/builder/execute/optimism.rs +++ b/lib/src/builder/execute/optimism.rs @@ -212,11 +212,11 @@ impl TxExecStrategy for OpTxExecStrategy { let trie_key = tx_no.to_rlp(); tx_trie .insert_rlp(&trie_key, tx) - .map_err(|e| Into::::into(e)) + .map_err(Into::::into) .context("failed to insert transaction")?; receipt_trie .insert_rlp(&trie_key, receipt) - .map_err(|e| Into::::into(e)) + .map_err(Into::::into) .context("failed to insert receipt")?; } diff --git a/lib/src/input.rs b/lib/src/input.rs index 2cc10331..4ac6c2ba 100644 --- a/lib/src/input.rs +++ b/lib/src/input.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use alloc::vec::Vec; +use alloc::{vec, vec::Vec}; use hashbrown::HashMap; use serde::{Deserialize, Serialize}; diff --git a/lib/src/optimism/batcher.rs b/lib/src/optimism/batcher.rs index 5b0d2ab8..6d95e59a 100644 --- a/lib/src/optimism/batcher.rs +++ b/lib/src/optimism/batcher.rs @@ -13,10 +13,10 @@ // limitations under the License. use alloc::{ - collections::{BinaryHeap, VecDeque, BTreeMap}, + collections::{BTreeMap, VecDeque}, vec::Vec, }; -use core::cmp::{Ordering, Reverse}; +use core::cmp::Ordering; use anyhow::{bail, ensure, Context, Result}; use zeth_primitives::{ diff --git a/lib/src/optimism/batcher_channel.rs b/lib/src/optimism/batcher_channel.rs index 9f676bf2..82203219 100644 --- a/lib/src/optimism/batcher_channel.rs +++ b/lib/src/optimism/batcher_channel.rs @@ -15,8 +15,8 @@ // use std::io::Read; use alloc::{ - format, collections::{BTreeMap, VecDeque}, + format, vec, vec::Vec, }; @@ -585,10 +585,10 @@ mod tests { let mut channel = new_channel(); channel.add_frame(frame_a).unwrap(); assert_eq!(channel.size, 209); - assert_eq!(channel.is_ready(), false); + assert!(!channel.is_ready()); channel.add_frame(frame_b).unwrap(); assert_eq!(channel.size, 420); - assert_eq!(channel.is_ready(), true); + assert!(channel.is_ready()); assert_eq!(channel.decompress().unwrap(), b"Hello World!"); } } diff --git a/primitives/src/batch.rs b/primitives/src/batch.rs index 1f17c300..020e1465 100644 --- a/primitives/src/batch.rs +++ b/primitives/src/batch.rs @@ -30,7 +30,7 @@ pub use core::{ result::{Result, Result::*}, }; -use alloy_primitives::{BlockNumber, Bytes, B256}; +use alloy_primitives::{Bytes, B256}; use alloy_rlp::{Decodable, Encodable}; use alloy_rlp_derive::{RlpDecodable, RlpEncodable}; use serde::{Deserialize, Serialize};