You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #301 - ajtribick:entry_ref, r=Amanieu
Add entry_ref API to HashMap
An initial attempt at an `entry_ref` API to do the simple case that `raw_entry_mut` is used for. I basically attempted to mirror the existing `entry` API, but allow passing a borrowed version of the key. I left off mirroring the `Send` and `Sync` traits as I'm not sure what these should be.
The relationships I use between the key `K` and borrowed key `Q` is `K: Borrow<Q> + From<&Q>`. The reason for not using `Q: ToOwned<K>` is to support key types like `Rc<str>` (which is used in a couple of the doctests), which would not be possible with `to_owned()`.
Hopefully this is somewhat useful.
0 commit comments