Closed
Description
This is a tracking issue for the unstable hashmap_hasher
feature in the standard library. This provides the ability to create a HashMap with a custom hashing implementation that abides by the HashState
trait. This has already been used quite a bit in the compiler itself as well as in Servo I believe.
Some notable points to consider:
- Is an extra
HashState
trait really necessary? - Is the naming of
HashState
correct? - Is the aggressive use of
Default
appropriate here? - Can the
new
constructor be leveraged to create hash maps that use a hasher implementingDefault
? Right now thenew
constructor only works withRandomState
. - How ergonomic is it to create a hash map using a custom
Hasher
implementation? In theory it should be quite ergonomic.
cc @gankro