-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
block-buffer: improve safety comments, use
MaybeUninit
for internal…
… buffer (#1081) Marks private `unchecked` methods as `unsafe` and documents their safety requirements. Adds `SAFETY` comment for all `unsafe` uses. Use of `copy_nonoverlapping` ensures that compiler will not generate unreachable panic branches. Use of `MaybeUninit` removes unnecessary initialization and helps to test that we do not read bytes which were not written by us. The code successfully passes MIRI tests, but I plan to test this implementation more thoroughly later.
- Loading branch information
Showing
3 changed files
with
141 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.