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();
|
||||
(self.header, hash)
|
||||
}
|
||||
}
|
||||
|
||||
/// Clones the header and returns a new sealed header.
|
||||
pub fn cloned(self) -> Self
|
||||
impl<H: Sealable> SealedHeader<&H> {
|
||||
/// Maps a `SealedHeader<&H>` to a `SealedHeader<H>` by cloning the header.
|
||||
pub fn cloned(self) -> SealedHeader<H>
|
||||
where
|
||||
H: Clone,
|
||||
{
|
||||
let (header, hash) = self.split();
|
||||
Self::new(header, hash)
|
||||
let Self { hash, header } = self;
|
||||
SealedHeader { hash, header: header.clone() }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user