Skip to content

Commit

Permalink
inline more
Browse files Browse the repository at this point in the history
  • Loading branch information
JieningYu committed Sep 5, 2023
1 parent d692c7d commit 5d42d82
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,14 +534,17 @@ impl<T> MutOnly<T> {
Self { value }
}

#[inline]
pub fn as_mut(&mut self) -> &mut T {
&mut self.value
}

#[inline]
pub fn as_ptr(&self) -> *mut T {
&self.value as *const T as *mut T
}

#[inline]
pub fn into_inner(self) -> T {
self.value
}
Expand Down

0 comments on commit 5d42d82

Please sign in to comment.