Skip to content
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

blake2.rs: remove unnecessary unsafe #239

Closed
wants to merge 1 commit into from

Conversation

abonander
Copy link

.copy_from_slice() is mildly annoying to use since it panics if the slices aren't the same length but using ptr::copy_nonoverlapping() is also a code smell.

This should perform the same as the previous version (including the assert!()) as the optimizer should be able to see that the internal assert in copy_from_slice() is always satisfied.

`.copy_from_slice()` is mildly annoying to use since it panics if the slices aren't the same length but using `ptr::copy_nonoverlapping()` is also a code smell.

This should perform the same as the previous version (including the `assert!()`) as the optimizer should be able to see that the internal assert in `copy_from_slice()` is always satisfied.
@abonander
Copy link
Author

The Clippy error looks to be unrelated to this change.

@newpavlov
Copy link
Member

Note that we plan completely rewrite blake2, see #228. Plus in #217 this method is already removed. So I think we can close this PR in favor of those two.

@newpavlov newpavlov closed this Feb 23, 2021
@abonander abonander deleted the patch-1 branch February 23, 2021 20:57
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