Closed yvt closed 1 year ago
r3_core::utils::ZeroInit should be replaced by bytemuck::Zeroable. The latter is derivable (which helps us remove some unsafe impls) and has a better Rust ecosystem compatibility.
r3_core::utils::ZeroInit
bytemuck::Zeroable
unsafe
Zeroable is missing the following implementations:
Zeroable
core::atomic::Atomic{Bool,{U,I}{8,16,32,64,size},Ptr<impl Sized>}
Option<fn(Args...) -> R>
Option<&[mut ]_>
UnsafeCell<impl Zeroable>
[impl Zeroable + Sized]
Sized
Merged in b6de1c0466b44b4f5e3b5287d3490ec3043318ab
r3_core::utils::ZeroInit
should be replaced bybytemuck::Zeroable
. The latter is derivable (which helps us remove someunsafe
impls) and has a better Rust ecosystem compatibility.Zeroable
is missing the following implementations:core::atomic::Atomic{Bool,{U,I}{8,16,32,64,size},Ptr<impl Sized>}
(https://github.com/Lokathor/bytemuck/issues/74)Option<fn(Args...) -> R>
Option<&[mut ]_>
UnsafeCell<impl Zeroable>
(https://github.com/Lokathor/bytemuck/pull/148)[impl Zeroable + Sized]
Zeroable
requiresSized