set deny(unsafe_op_in_unsafe_fn) for

This commit is contained in:
JustAnotherDev
2024-09-11 20:55:05 +01:00
parent 6e4fdf70f5
commit 7df5b16f9e
3 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ impl<T> Waitval<T> {
// SAFETY: Caller must ensure both (1) that the value has not yet been initialized, and (2)
// that this is never run by more than one thread simultaneously.
pub unsafe fn post(&self, value: T) {
self.value.get().write(MaybeUninit::new(value));
unsafe { self.value.get().write(MaybeUninit::new(value)) };
self.state.store(1, Ordering::Release);
crate::sync::futex_wake(&self.state, i32::MAX);
}