-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use MaybeUninit properly #1572
Comments
It appears the only remaining place where this needs to be fixed is in |
How to handle It's relatively easy to remove Alternatively, maybe there could be a simpler type that is purely |
When do we have a PlaneRegion that is pointing to something not initialized though? |
|
Now that we switched to
MaybeUninit
in #1292 we might as well start using it properly; right now as far as I can tell it's equivalent tomem::uninitialized()
in our usage. See theMaybeUninit
docs.In particular, instead of doing
MaybeUninit::uninit().assume_init()
we should be doingMaybeUninit::uninit()
, then initializing the value using.as_mut_ptr().write(...)
and only then doing.assume_init()
.The text was updated successfully, but these errors were encountered: