-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 Hash on tuples and owned containers #5195
Labels
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
Comments
Nominating to change milestone to 5 (production-ready). |
I don't think this is actually milestone-worthy. |
Just some notes (which I'm sure the current participants are already aware of, this is more for general reviewers):
|
I think this is just done, right? They're all hashable now, I believe. |
@gankro I think you're right. Closing. |
ghost
closed this as completed
Nov 10, 2014
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
May 2, 2020
Rustup to rust-lang#69194 changelog: none
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is definitely important for tuples (similar to how they implement
Ord
), but I think anIterBytes
implementation would be strange, so they would probably have to use SipHash directly.Hash
can also be implemented for freezable containers like vectors, maps and sets. In Python this is a very common idiom and they actually have afrozenset
type for this use case, and it's the main reason Python has tuples (which in Python are just immutable lists).Ideally there would be one implementation of combining hashes and it can be reused. I'm not entirely sure how such a thing would be implemented correctly though.
The text was updated successfully, but these errors were encountered: