Skip to content

Commit

Permalink
chore: add clone_inner (#825)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Dec 13, 2024
1 parent 37582b2 commit ea88d20
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 ea88d20

Please sign in to comment.