Either use maybeuninit, or see if the current compiler avoids the excessive stack copies so we can avoid unsafe alltogether.
The current usage should be safe, as it's used with a copy type that does not have invalid values, though as stated in the deprecation blog, mem::uninitialized may actually never be completely safe.
deprecated
Either use maybeuninit, or see if the current compiler avoids the excessive stack copies so we can avoid unsafe alltogether.
The current usage should be safe, as it's used with a copy type that does not have invalid values, though as stated in the deprecation blog, mem::uninitialized may actually never be completely safe.