[core] Add #[inline] attribute

parent 1155e57c
Pipeline #99549 passed with stages
in 6 minutes and 27 seconds
......@@ -320,6 +320,7 @@ where
/// # Panics
///
/// If accessing the inner value fails.
#[inline]
pub fn set(&mut self, new_value: T) {
// SAFETY: This is critical because we mutably access the entry.
let cache = unsafe { &mut *self.cache.get_ptr().as_ptr() };
......
......@@ -169,6 +169,7 @@ where
/// # Panics
///
/// If accessing the inner value fails.
#[inline]
pub fn set(lazy: &mut Self, new_value: T) {
lazy.cell.set(new_value);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment