Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: remove unsafe slice MaybeUninit::uninit().assume_init()#601

Merged
sharksforarms merged 1 commit into
sharksforarms:masterfrom
carlocorradini:slice_uninit_unsafe
Oct 9, 2025
Merged

fix: remove unsafe slice MaybeUninit::uninit().assume_init()#601
sharksforarms merged 1 commit into
sharksforarms:masterfrom
carlocorradini:slice_uninit_unsafe

Conversation

@carlocorradini
Copy link
Copy Markdown
Contributor

@carlocorradini carlocorradini commented Sep 13, 2025

Fix #600

In addition:

  • slice has been renamed array because it is a more descriptive name in this case
  • renamed it to value for clarity
  • item.write(value); in match Ok
  • SAFETY comments
  • rewritten (core::ptr::addr_of!(slice) as *const [T; N]).read() into (core::ptr::addr_of!(array).cast::<[T; N]>()).read() leveraging pointer.cast

@sharksforarms sharksforarms merged commit 257a1d4 into sharksforarms:master Oct 9, 2025
9 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remove unsafe slice MaybeUninit::uninit().assume_init()

3 participants