Skip to content

Conversation

@Lucretiel
Copy link

@Lucretiel Lucretiel commented Oct 27, 2023

Remove uninitialized, which always produces UB when used with integers. We replace it with all zero bits, and trust that the compiler will trivially remove the unnecessary 0-initialization, since encode_utf8 is write-only.

Remove `uninitialized`, which always produces UB when used with integers
@Lucretiel
Copy link
Author

Closes #57

@jhand2
Copy link

jhand2 commented Dec 4, 2023

@japaric can this be merged? I believe it is an uncontroversial change and makes it easier to reason about the behavior of ufmt.

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