mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: rm clone for bincodecompat receipt (#14628)
This commit is contained in:
@ -195,14 +195,14 @@ impl reth_primitives_traits::Receipt for Receipt {}
|
|||||||
|
|
||||||
#[cfg(feature = "serde-bincode-compat")]
|
#[cfg(feature = "serde-bincode-compat")]
|
||||||
impl reth_primitives_traits::serde_bincode_compat::SerdeBincodeCompat for Receipt {
|
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<'_> {
|
fn as_repr(&self) -> Self::BincodeRepr<'_> {
|
||||||
self.clone()
|
alloc::borrow::Cow::Borrowed(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn from_repr(repr: Self::BincodeRepr<'_>) -> Self {
|
fn from_repr(repr: Self::BincodeRepr<'_>) -> Self {
|
||||||
repr
|
repr.into_owned()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user