owning-ref-rs icon indicating copy to clipboard operation
owning-ref-rs copied to clipboard

Fix #77

Open noamtashma opened this issue 3 years ago • 5 comments

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 "allow OwningRef::as_owner and similar methods, but disallow convertion from OwningRefMut to OwningRef". 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 avatar Jan 23 '22 19:01 noamtashma

@noamtashma would you consider releasing this as a separate crate on crates.io?

Ten0 avatar Oct 11 '23 16:10 Ten0

@Ten0 I released this as the safer_owning_ref crate.

noamtashma avatar Oct 14 '23 20:10 noamtashma

Amazing, thanks! :)

Ten0 avatar Oct 17 '23 16:10 Ten0

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?

Ten0 avatar Oct 23 '23 12:10 Ten0

enabled issues

noamtashma avatar Oct 23 '23 14:10 noamtashma