Skip to content

Commit

Permalink
chore: add clone_inner
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Dec 13, 2024
1 parent 37582b2 commit efd25af
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/primitives/src/sealed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ impl<T> Sealed<T> {
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 {
Expand Down

0 comments on commit efd25af

Please sign in to comment.