chore: remove some cfg imports (#11864)

This commit is contained in:
Matthias Seitz
2024-10-18 00:42:24 +02:00
committed by GitHub
parent 62e7625b16
commit dfcaad4608
2 changed files with 4 additions and 6 deletions

View File

@@ -10,8 +10,6 @@ use alloy_primitives::{Address, Bytes, Sealable, B256};
use alloy_rlp::{Decodable, Encodable, RlpDecodable, RlpEncodable};
use derive_more::{Deref, DerefMut};
#[cfg(any(test, feature = "arbitrary"))]
use proptest::prelude::prop_compose;
#[cfg(any(test, feature = "arbitrary"))]
pub use reth_primitives_traits::test_utils::{generate_valid_header, valid_header_strategy};
use reth_primitives_traits::Requests;
use serde::{Deserialize, Serialize};
@@ -20,7 +18,7 @@ use serde::{Deserialize, Serialize};
// a block with `None` withdrawals and `Some` requests, in which case we end up trying to decode the
// requests as withdrawals
#[cfg(any(feature = "arbitrary", test))]
prop_compose! {
proptest::prelude::prop_compose! {
pub fn empty_requests_strategy()(_ in 0..1) -> Option<Requests> {
None
}

View File

@@ -11,14 +11,14 @@ use bytes::{Buf, BufMut};
use core::{cmp::Ordering, ops::Deref};
use derive_more::{DerefMut, From, IntoIterator};
#[cfg(feature = "reth-codec")]
use reth_codecs::{Compact, CompactZstd};
use reth_codecs::Compact;
use serde::{Deserialize, Serialize};
/// Receipt containing result of transaction execution.
#[derive(
Clone, Debug, PartialEq, Eq, Default, RlpEncodable, RlpDecodable, Serialize, Deserialize,
)]
#[cfg_attr(any(test, feature = "reth-codec"), derive(CompactZstd))]
#[cfg_attr(any(test, feature = "reth-codec"), derive(reth_codecs::CompactZstd))]
#[cfg_attr(any(test, feature = "reth-codec"), reth_codecs::add_arbitrary_tests)]
#[rlp(trailing)]
pub struct Receipt {
@@ -130,7 +130,7 @@ impl From<Receipt> for ReceiptWithBloom {
/// [`Receipt`] with calculated bloom filter.
#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
#[cfg_attr(any(test, feature = "arbitrary"), derive(arbitrary::Arbitrary))]
#[cfg_attr(any(test, feature = "reth-codec"), derive(Compact))]
#[cfg_attr(any(test, feature = "reth-codec"), derive(reth_codecs::Compact))]
#[cfg_attr(any(test, feature = "reth-codec"), reth_codecs::add_arbitrary_tests(compact))]
pub struct ReceiptWithBloom {
/// Bloom filter build from logs.