Skip to content

Commit

Permalink
chore: remove some cfg imports (#11864)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Oct 17, 2024
1 parent 62e7625 commit dfcaad4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions crates/primitives/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -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
}
Expand Down
6 changes: 3 additions & 3 deletions crates/primitives/src/receipt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit dfcaad4

Please sign in to comment.