Skip to content

Eliminate unsafe_write_num_bytes and thus unsafe block inside of it #193

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

Closed
wants to merge 1 commit into from

Conversation

mina86
Copy link
Contributor

@mina86 mina86 commented Aug 21, 2023

unsafe_write_num_bytes macro can be replaced by a perfectly safe code
which uses n::to_xx_bytes() to convert given number to desired
representation and buf[..N].copy_from_slice(...) which writes that
into the buffer.

unsafe_write_num_bytes macro can be replaced by a perfectly safe code
which uses `n::to_xx_bytes()` to convert given number to desired
representation and `buf[..N].copy_from_slice(...)` which writes that
into the buffer.
BurntSushi pushed a commit that referenced this pull request Oct 5, 2023
unsafe_write_num_bytes macro can be replaced by a perfectly safe code
which uses `n::to_xx_bytes()` to convert given number to desired
representation and `buf[..N].copy_from_slice(...)` which writes that
into the buffer.

Closes #193
BurntSushi pushed a commit that referenced this pull request Oct 5, 2023
unsafe_write_num_bytes macro can be replaced by a perfectly safe code
which uses `n::to_xx_bytes()` to convert given number to desired
representation and `buf[..N].copy_from_slice(...)` which writes that
into the buffer.

Closes #193
@BurntSushi BurntSushi closed this in 1e2d8b0 Oct 6, 2023
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.

1 participant