Open nazar-pc opened 9 months ago
Maybe we could use NoUninit
instead of Pod
. Would you be willing to write up a PR for this?
That sounds like a solution, I'll try to create a PR this weekend
It already uses NoUninit
:
https://github.com/Amanieu/atomic-rs/blob/79ace14a69d8d4a45cc7f6cd06ff0cbb5849b2fd/src/lib.rs#L119
NonZero*
types implement NoUninit
: https://docs.rs/bytemuck/latest/bytemuck/trait.NoUninit.html
What prevents me from upgrading to 0.6 right now is that
bytemuck::Pod
isn't implemented forNonZero*
types. Is it expected or side-effect of the implementation?Maybe a separate trait is needed that is auto-implemented for types that implement
Pod
, but can also be implemented for other types likeNonZero*
?