Remove ChunksFixed
which contains one line of unsafe
code.
#1736
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See the individual commit messages.
chunks_fixed.rs didn't have a license header when it should have. That means that the original LoC total is 14 LoC lower than it should have been. Thus this change is +13 -48 -14 (net -49) LoC, which combined with PR #1732's net +58 means that this project cost 11 LoC using the most naive metric of complexity we can get.
Unlike in PR #1732, here we're using potentially-panicking array slicing or equivalent (e.g.
copy_from_slice
). So we're trading static guarantee of not panicking for static guarantee of safety. In this code it is obvious that no panic will be occur so it's not a giant deal. We do the same elsewhere, unfortunately.I don't feel super great about that. However, I think it does help us evaluate using zerocopy or other dependencies (ideally an improved standard library and/or language) to eliminate use of potentially-panicking APIs in addition to eliminating use of
unsafe
and/or making ourunsafe
use safer.