Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opt-in mutable access on IndexSet, release 2.2.6 #323

Merged
merged 4 commits into from
Mar 23, 2024

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Mar 20, 2024

This adds set::MutableValues as an opt-in trait for accessing IndexSet values by mutable reference, akin to map::MutableKeys. The implementation simply forwards to the map implementation while discarding the () inner "value".

Unlike IndexMap, IndexSet doesn't have regular get_full_mut or get_index_mut methods, so the "2" suffix here isn't really necessary, but I thought it might be better to stay consistent with MutableKeys on that.

Closes #322

@cuviper
Copy link
Member Author

cuviper commented Mar 20, 2024

@Morganamilo would this work for you?

@Morganamilo
Copy link

This is what I was looking for thanks.

@cuviper cuviper changed the title Opt-in mutable access on IndexSet Opt-in mutable access on IndexSet, release 2.2.6 Mar 22, 2024
@cuviper cuviper added this pull request to the merge queue Mar 23, 2024
Merged via the queue into indexmap-rs:master with commit 3f0fffb Mar 23, 2024
16 checks passed
@cuviper cuviper deleted the mutable branch August 30, 2024 17:43
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.

MutableKeys for IndexSet
2 participants