-
Notifications
You must be signed in to change notification settings - Fork 165
impl Hash for IndexSet, IndexMap #67
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
Comments
A hash and equality combination that is consistent needs to be present. I doubt we can or want to do that, because we also want eq rules to be the same as for hashmap(?) |
Yep it's one or the other. I hadn't thought about wanting equality to disregard order. I'd have expected otherwise but perhaps it's simpler this way. Thanks for the clarification. |
The open PR rust-lang/rust#48366 is proposing |
I've been thinking about reintroducing |
I think it would be useful for
IndexSet
, likeVec
, to implementHash
. Technically there's no reasonIndexMap
couldn't either, though I'm not sure how useful it would be practically.It should be a pretty simple addition, are there downsides?
The text was updated successfully, but these errors were encountered: