Skip to content

Conversation

@clarfonthey
Copy link
Contributor

@clarfonthey clarfonthey commented Dec 3, 2025

This allows implementing get_or_insert and get_or_insert_with without accessing the internals of HashMap, which is useful for #666.


Since the merge queue is busted, I decided to incorporate the suggestion to make EntryRef use ToOwned again.

Resolves #660.

@clarfonthey clarfonthey force-pushed the entry-into-entry branch 2 times, most recently from ba2b7a9 to 6a6e760 Compare December 3, 2025 14:51
@Amanieu Amanieu added this pull request to the merge queue Dec 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 12, 2025
* Add hash_map::{OccupiedEntry::into_entry, VacantEntryRef::insert_entry_with_key}
* Make hash_map::EntryRef use ToOwned instead of From/Into
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QQ: Why use &'b Q: Into<K> over Q: ToOwned<Owned = K> as EntryRef::insert trait bound?

1 participant