Commit c6affc5
committed
Provide default hasher types to
For code which may select to use the `std` `HashMap` or the
`hashbrown` `HashMap` based on feature or cfg flags, being forced
to provide an explicit hash argument to `VacantEntry` or
`OccupiedEntry` structs requires jumping through some hoops.
Specifically, the `std` `hash_map::*Entry` structs don't take a
hasher type argument at all, making the downstream code change the
type entirely when switching from `std` to `hashbrown` or back.
For simplicity, its nice to have the argument be optional on the
`hashbrown` end, which would let the same code compile with either
map.Vacant and Occupied entries1 parent dcb854f commit c6affc5
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4297 | 4297 | | |
4298 | 4298 | | |
4299 | 4299 | | |
4300 | | - | |
| 4300 | + | |
4301 | 4301 | | |
4302 | 4302 | | |
4303 | 4303 | | |
| |||
4360 | 4360 | | |
4361 | 4361 | | |
4362 | 4362 | | |
4363 | | - | |
| 4363 | + | |
4364 | 4364 | | |
4365 | 4365 | | |
4366 | 4366 | | |
| |||
0 commit comments