mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: move SealedHeader::cloned to &H (#13904)
This commit is contained in:
@ -96,14 +96,16 @@ impl<H: Sealable> SealedHeader<H> {
|
|||||||
let hash = self.hash();
|
let hash = self.hash();
|
||||||
(self.header, hash)
|
(self.header, hash)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Clones the header and returns a new sealed header.
|
impl<H: Sealable> SealedHeader<&H> {
|
||||||
pub fn cloned(self) -> Self
|
/// Maps a `SealedHeader<&H>` to a `SealedHeader<H>` by cloning the header.
|
||||||
|
pub fn cloned(self) -> SealedHeader<H>
|
||||||
where
|
where
|
||||||
H: Clone,
|
H: Clone,
|
||||||
{
|
{
|
||||||
let (header, hash) = self.split();
|
let Self { hash, header } = self;
|
||||||
Self::new(header, hash)
|
SealedHeader { hash, header: header.clone() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user