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

Implement From between IndexedEntry and OccupiedEntry #341

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Aug 28, 2024

  • From<OccupiedEntry> for IndexedEntry is trivially O(1).
  • From<IndexedEntry> for OccupiedEntry is O(1) average, requiring a RawTable search for the bucket.

Either way, there's not much reason to convert unless you're normalizing different lookup results somewhere, but it's easy enough to support this that we might as well.

@cuviper cuviper added this pull request to the merge queue Aug 28, 2024
Merged via the queue into indexmap-rs:master with commit b63e4a1 Aug 28, 2024
16 checks passed
@cuviper cuviper deleted the from-entry branch August 28, 2024 20:52
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.

1 participant