-
Notifications
You must be signed in to change notification settings - Fork 50
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 #77 #78
Open
noamtashma
wants to merge
10
commits into
Kimundi:master
Choose a base branch
from
noamtashma:fix_unsound_map
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix #77 #78
Conversation
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
…ers (breaking change!)
for a bit more backwards compatibility
Removed the bad conversion from OwningRefMut to OwningRef. Adapted some tests, others just added `unsafe`. Doc tests don't compile.
reference to the owner itself. Keeping the old version as `.direct` functions, since the only breakage I could think of would literally be unsound anyways. Fixed tests.
@noamtashma would you consider releasing this as a separate crate on crates.io? |
noamtashma
force-pushed
the
fix_unsound_map
branch
2 times, most recently
from
October 12, 2023 09:58
40bb34f
to
3714d36
Compare
@Ten0 I released this as the |
Amazing, thanks! :) |
Issues are not enabled by default on forks, would it be possible to enable them on the repository so that we can get notified in case somebody notices an issue? |
enabled issues |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is my fork that fixes #77 . I based it on the existing work in #72 .
Some things I'm not sure of:
OwningRef
is appropriate? For now I chose to implement "allowOwningRef::as_owner
and similar methods, but disallow convertion fromOwningRefMut
toOwningRef
". But perhaps the other option is better.For now the functions that became unsafe keep their documentation, except it has
unsafe
in the doc-tests so they wouldn't fail.map_with_owner
has changed to be safe, and a new unsafe deprecated function calledmap_with_owner_direct
equivalent to the old one was added, for backwards compatibility. However on second thought creating a new deprecated function doesn't seem like the best decision, so I would like to hear what would be preferred.And of course, thank you for your time maintaining this library!