owning-ref-rs
owning-ref-rs copied to clipboard
Fix #77
This is my fork that fixes #77 . I based it on the existing work in #72 .
Some things I'm not sure of:
- Which option for the semantics 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. - Should unsafe functions be kept as unsafe (and deprecated) methods for backwards compatibility?
- How exactly should I change the documentation of these functions?
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 called map_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!
@noamtashma would you consider releasing this as a separate crate on crates.io?
@Ten0 I released this as the safer_owning_ref
crate.
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