}
#[inline(always)]
+ #[allow(clippy::mut_from_ref)]
pub fn alloc<T>(&self, value: T) -> &mut T {
// Safety: We allocate memory for `T` and then write a `T` into that location.
unsafe {
}
#[inline(always)]
+ #[allow(clippy::mut_from_ref)]
pub fn alloc_with<T, F>(&self, f: F) -> &mut T
where
F: FnOnce() -> T,
}
#[inline(always)]
+ #[allow(clippy::mut_from_ref)]
pub fn try_alloc_with<T, F>(&self, f: F) -> Result<&mut T, AllocError>
where
F: FnOnce() -> T,
}
#[inline(always)]
+ #[allow(clippy::mut_from_ref)]
pub fn alloc<T>(&self, value: T) -> &mut T {
// Safety: We allocate memory for `T` and then write a `T` into that location.
unsafe {
}
#[inline(always)]
+ #[allow(clippy::mut_from_ref)]
pub fn alloc_with<T, F>(&self, f: F) -> &mut T
where
F: FnOnce() -> T,
}
#[inline(always)]
+ #[allow(clippy::mut_from_ref)]
pub fn try_alloc_with<T, F>(&self, f: F) -> Result<&mut T, AllocError>
where
F: FnOnce() -> T,