From 5b212edb12ba52375c3af8e1ca961be33c4b8c97 Mon Sep 17 00:00:00 2001 From: lightsing Date: Wed, 25 Dec 2024 10:13:19 +0800 Subject: [PATCH] cargo fmt --- crates/primitives-traits/src/lib.rs | 15 ++++++++++----- crates/primitives/src/transaction/mod.rs | 5 ++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/crates/primitives-traits/src/lib.rs b/crates/primitives-traits/src/lib.rs index 08602f6f8941..1a1427ec5674 100644 --- a/crates/primitives-traits/src/lib.rs +++ b/crates/primitives-traits/src/lib.rs @@ -95,7 +95,10 @@ pub use node::{BodyTy, FullNodePrimitives, HeaderTy, NodePrimitives, ReceiptTy}; /// Helper trait that requires rayon since `rayon` feature is enabled. #[cfg(feature = "rayon")] -pub trait MaybeIntoParallelIterator: rayon::iter::IntoParallelIterator::Item> + IntoIterator::Item> { +pub trait MaybeIntoParallelIterator: + rayon::iter::IntoParallelIterator::Item> + + IntoIterator::Item> +{ /// The type of the elements being iterated over. type Item; } @@ -108,14 +111,16 @@ pub trait MaybeIntoParallelIterator: IntoIterator { #[cfg(feature = "rayon")] impl MaybeIntoParallelIterator for T - where - T: rayon::iter::IntoParallelIterator::Item> + IntoIterator, +where + T: rayon::iter::IntoParallelIterator::Item> + IntoIterator, { type Item = ::Item; - } #[cfg(not(feature = "rayon"))] -impl MaybeIntoParallelIterator for T where T: core::iter::IntoIterator { +impl MaybeIntoParallelIterator for T +where + T: core::iter::IntoIterator, +{ fn into_par_iter(self) -> Self::IntoIter { self.into_iter() } diff --git a/crates/primitives/src/transaction/mod.rs b/crates/primitives/src/transaction/mod.rs index a3ae1162439c..49e8f688f795 100644 --- a/crates/primitives/src/transaction/mod.rs +++ b/crates/primitives/src/transaction/mod.rs @@ -35,7 +35,7 @@ pub use reth_primitives_traits::{ transaction::error::{ InvalidTransactionError, TransactionConversionError, TryFromRecoveredTransactionError, }, - WithEncoded, MaybeIntoParallelIterator + MaybeIntoParallelIterator, WithEncoded, }; use reth_primitives_traits::{InMemorySize, SignedTransaction}; use revm_primitives::{AuthorizationList, TxEnv}; @@ -75,8 +75,7 @@ pub static PARALLEL_SENDER_RECOVERY_THRESHOLD: LazyLock = /// Expected number of transactions where we can expect a speed-up by recovering the senders in /// parallel. #[cfg(not(feature = "rayon"))] -pub static PARALLEL_SENDER_RECOVERY_THRESHOLD: LazyLock = - LazyLock::new(|| usize::MAX); +pub static PARALLEL_SENDER_RECOVERY_THRESHOLD: LazyLock = LazyLock::new(|| usize::MAX); /// A raw transaction. ///