chore: rm clone for bincodecompat receipt (#14628)

This commit is contained in:
Matthias Seitz
2025-02-22 08:52:59 +01:00
committed by GitHub
parent 40364d5321
commit ea680785be

View File

@ -195,14 +195,14 @@ impl reth_primitives_traits::Receipt for Receipt {}
#[cfg(feature = "serde-bincode-compat")]
impl reth_primitives_traits::serde_bincode_compat::SerdeBincodeCompat for Receipt {
type BincodeRepr<'a> = Self;
type BincodeRepr<'a> = alloc::borrow::Cow<'a, Self>;
fn as_repr(&self) -> Self::BincodeRepr<'_> {
self.clone()
alloc::borrow::Cow::Borrowed(self)
}
fn from_repr(repr: Self::BincodeRepr<'_>) -> Self {
repr
repr.into_owned()
}
}