From ea88d20a952714bf2938a8633811f0ef2aba8767 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 13 Dec 2024 14:05:56 +0100 Subject: [PATCH] chore: add clone_inner (#825) --- crates/primitives/src/sealed.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/primitives/src/sealed.rs b/crates/primitives/src/sealed.rs index 6c896d78b..8c1b3ed69 100644 --- a/crates/primitives/src/sealed.rs +++ b/crates/primitives/src/sealed.rs @@ -75,6 +75,15 @@ impl Sealed { self.into_parts() } + /// Clone the inner item. + #[inline(always)] + pub fn clone_inner(&self) -> T + where + T: Clone, + { + self.inner.clone() + } + /// Get the inner item. #[inline(always)] pub const fn inner(&self) -> &T {