-
Notifications
You must be signed in to change notification settings - Fork 102
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
Allow creating an AHashMap without an Eq
or Hash
bound on the keys
#52
Comments
jyn514
changed the title
Allow creating an AHashMap with out an
Allow creating an AHashMap without an Oct 16, 2020
Eq
bound on the keysEq
bound on the keys
tkaitchuck
added a commit
that referenced
this issue
Oct 16, 2020
Signed-off-by: Tom Kaitchuck <[email protected]>
Done 00d7e74 |
Sorry, my request wasn't clear: I said 'Eq' but I meant 'neither Eq not Hash'. Both aren't necessary for these functions. |
@jyn514 What are you doing with these hashmaps that don't contain any items?! |
Don't ask me, ask rustc 😆 Small set optimizations! https://doc.rust-lang.org/nightly/nightly-rustc/rustc_data_structures/sso/enum.SsoHashMap.html |
jyn514
changed the title
Allow creating an AHashMap without an
Allow creating an AHashMap without an Oct 16, 2020
Eq
bound on the keysEq
or Hash
bound on the keys
tkaitchuck
added a commit
that referenced
this issue
Oct 16, 2020
Ok. Done 23af182 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
with_capacity_and_hasher
requiresK
to implementEq
:Consider relaxing that bound, I think you shouldn't need it for constructing the hashmap, only for operations involving the elements (get/set/entry). Same request for various other functions, new(), capacity(), len(), etc.
Note the error is misleading here -
FxHashMap
is an alias forAHashMap
that I renamed because it was simpler than changing a hundred imports.Originally posted by @jyn514 in rust-lang/rust#77996 (comment)
The text was updated successfully, but these errors were encountered: