diff --git a/crates/consensus/src/receipt/receipts.rs b/crates/consensus/src/receipt/receipts.rs index b91afd6e613..492583b1539 100644 --- a/crates/consensus/src/receipt/receipts.rs +++ b/crates/consensus/src/receipt/receipts.rs @@ -63,6 +63,13 @@ where } } +impl From> for Receipt { + /// Consume the structure, returning only the receipt + fn from(receipt_with_bloom: ReceiptWithBloom) -> Self { + receipt_with_bloom.receipt + } +} + /// [`Receipt`] with calculated bloom filter. /// /// This convenience type allows us to lazily calculate the bloom filter for a @@ -137,14 +144,8 @@ impl ReceiptWithBloom { impl ReceiptWithBloom { /// Create new [ReceiptWithBloom] - pub const fn new(receipt: Receipt, bloom: Bloom) -> Self { - Self { receipt, logs_bloom: bloom } - } - - /// Consume the structure, returning only the receipt - #[allow(clippy::missing_const_for_fn)] // false positive - pub fn into_receipt(self) -> Receipt { - self.receipt + pub const fn new(receipt: Receipt, logs_bloom: Bloom) -> Self { + Self { receipt, logs_bloom } } /// Consume the structure, returning the receipt and the bloom filter