Skip to content

Commit 898a9fe

Browse files
committed
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.
2 parents b3eaf32 + 7c545e1 commit 898a9fe

File tree

2 files changed

+1171
-67
lines changed

2 files changed

+1171
-67
lines changed

0 commit comments

Comments
 (0)