Skip to content

Conversation

ya7010
Copy link

@ya7010 ya7010 commented Sep 6, 2025

Added a method whose implementation had been forgotten.

@cuviper
Copy link
Member

cuviper commented Sep 7, 2025

Nit: the title and commit message left out the _mut suffix.

This is a simple thing to add, but I notice that only hashbrown has this map method, not the standard library's HashMap nor BTreeMap. So it's not really missing or forgotten in terms of std parity, but we should probably add this everywhere. Would you be willing to propose this as an ACP?

In the meantime, IndexMap::get_full_mut provides the same access, along with the index.

@cuviper
Copy link
Member

cuviper commented Sep 7, 2025

There's some prior discussion on rust-lang/rust#49347, but not much to go on.

@ya7010 ya7010 changed the title feat: add IndexMap::get_key_value feat: add IndexMap::get_key_value_mut Sep 7, 2025
@ya7010 ya7010 force-pushed the add_get_key_value_mut branch from c52a3b8 to b1c7ce5 Compare September 7, 2025 21:19
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.

2 participants