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

Add some missing methods to FrozenIndexMap and FrozenIndexSet #77

Conversation

yegorvk
Copy link
Contributor

@yegorvk yegorvk commented Jul 16, 2024

This PR adds some get_ methods from indexmap::IndexMap and indexset::IndexSet to their frozen counterparts and makes existing ones more flexible.

Changes

New Methods

  • FrozenIndexMap and FrozenIndexSet:
    • get_index_of
  • FrozenIndexSet:
    • get_full

Updated Methods

  • Changed most get_ methods to use the indexmap::Equivalent trait bound instead of Borrow + Eq.

New Exports

  • crate::index_map now reexports indexmap::Equivalent.

refactor: fix variable names in `index_map.rs` and `index_set.rs`
Allow get_ methods of `index_map::FrozenIndexMap` and `index_set::FrozenIndexSet` to accept values that implement `Equivalent<K>` or `Equivalent<T>` as keys.
@Manishearth Manishearth merged commit 94214fa into Manishearth:master Jul 16, 2024
1 check passed
@yegorvk yegorvk deleted the missing-methods-frozen-indexmap-indexset branch July 16, 2024 18:55
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