Skip to content

Commit

Permalink
chore: rm duplicated cfg (#12406)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Nov 8, 2024
1 parent bce7031 commit b8bc74a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions crates/primitives/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1755,8 +1755,6 @@ pub mod serde_bincode_compat {
TxEip4844,
};
use alloy_primitives::{PrimitiveSignature as Signature, TxHash};
#[cfg(feature = "optimism")]
use op_alloy_consensus::serde_bincode_compat::TxDeposit;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use serde_with::{DeserializeAs, SerializeAs};

Expand Down Expand Up @@ -1784,8 +1782,7 @@ pub mod serde_bincode_compat {
Eip4844(Cow<'a, TxEip4844>),
Eip7702(TxEip7702<'a>),
#[cfg(feature = "optimism")]
#[cfg(feature = "optimism")]
Deposit(TxDeposit<'a>),
Deposit(op_alloy_consensus::serde_bincode_compat::TxDeposit<'a>),
}

impl<'a> From<&'a super::Transaction> for Transaction<'a> {
Expand All @@ -1797,7 +1794,9 @@ pub mod serde_bincode_compat {
super::Transaction::Eip4844(tx) => Self::Eip4844(Cow::Borrowed(tx)),
super::Transaction::Eip7702(tx) => Self::Eip7702(TxEip7702::from(tx)),
#[cfg(feature = "optimism")]
super::Transaction::Deposit(tx) => Self::Deposit(TxDeposit::from(tx)),
super::Transaction::Deposit(tx) => {
Self::Deposit(op_alloy_consensus::serde_bincode_compat::TxDeposit::from(tx))
}
}
}
}
Expand Down Expand Up @@ -1900,7 +1899,6 @@ pub mod serde_bincode_compat {
#[cfg(test)]
mod tests {
use super::super::{serde_bincode_compat, Transaction, TransactionSigned};

use arbitrary::Arbitrary;
use rand::Rng;
use reth_testing_utils::generators;
Expand Down
2 changes: 1 addition & 1 deletion crates/storage/db/benches/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ where
env!("CARGO_MANIFEST_DIR"),
T::NAME
))
.expect("Test vectors not found. They can be generated from the workspace by calling `cargo run --bin reth --features dev -- test-vectors tables`."),
.unwrap_or_else(|_| panic!("Test vectors not found. They can be generated from the workspace by calling `cargo run --bin reth --features dev -- test-vectors tables`.")),
))
.unwrap();

Expand Down

0 comments on commit b8bc74a

Please sign in to comment.