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

Fix bug in .join_cover() and bug in ContiguousMut #14

Merged
merged 2 commits into from
Sep 7, 2019
Merged

Conversation

bluss
Copy link
Owner

@bluss bluss commented Sep 7, 2019

.join_cover() changes so that it reuses the proof of the first parameter; this is an API break but the proof was wrong, so it's only good.

Fix ContiguousMut methods to use a &mut receiver for the mutable raw pointer methods. This is an API break, but the old signature was always wrong.

Fixes #11
Fixes #12

This is an API break, because the previous proof was unsound. Like the
bug points out, in join cover we take (self, other) and extend self
until the end of other; if other ends before self, we don't gain
any "cover" from other, and thus the proof is the same as self (making
the method quite useless).

Added traits for checking the proof value in dynamic code, since
completest really doesn't work well right now.
This is the only sound way to derive proper raw mut pointers from
slices.
@bluss bluss changed the title Fix bug in .join_cover() and bug in ContiguousMut Fix bugs in .join_cover() and bug in ContiguousMut Sep 7, 2019
@bluss bluss changed the title Fix bugs in .join_cover() and bug in ContiguousMut Fix bug in .join_cover() and bug in ContiguousMut Sep 7, 2019
@bluss bluss merged commit e4eb6e6 into master Sep 7, 2019
@bluss bluss deleted the fix-join-cover branch September 7, 2019 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant