Skip to content

Replace usage of assume_init_mut with as_mut_ptr#562

Merged
decahedron1 merged 1 commit intopykeio:mainfrom
imjakingit:patch-1
Mar 28, 2026
Merged

Replace usage of assume_init_mut with as_mut_ptr#562
decahedron1 merged 1 commit intopykeio:mainfrom
imjakingit:patch-1

Conversation

@imjakingit
Copy link
Copy Markdown
Contributor

Usage of assume_init_mut is unsafe if the memory is uninitialized, as forming a reference to uninitialized memory is undefined behavior. Using &raw mut prevents the creation of an unsafe intermediate reference.

Usage of assume_init_mut is unsafe if the memory is uninitialized, as forming a reference to uninitialized memory is undefined behavior. Using &raw mut prevents the creation of an unsafe intermediate reference.
@decahedron1
Copy link
Copy Markdown
Member

Thanks! This was bugging me for a while.

@decahedron1 decahedron1 merged commit d85e776 into pykeio:main Mar 28, 2026
18 checks passed
@imjakingit imjakingit deleted the patch-1 branch March 28, 2026 05:13
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.

2 participants