Skip to content

Commit eb018e9

Browse files
committed
fixup! rust: types: Add Opaque::zeroed()
1 parent 193cb7c commit eb018e9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

rust/kernel/types.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,10 @@ impl<T> Opaque<T> {
230230

231231
/// Creates a zeroed value.
232232
pub fn zeroed() -> Self {
233-
Self(MaybeUninit::zeroed())
233+
Self {
234+
value: UnsafeCell::new(MaybeUninit::zeroed()),
235+
_pin: PhantomPinned,
236+
}
234237
}
235238

236239
/// Creates a pin-initializer from the given initializer closure.

0 commit comments

Comments
 (0)