Closed cuviper closed 9 months ago
However, there are a few other unconstrained methods that also need the saved hash, like
swap_remove_index
going back long before version 1.0 of the crate, so that ship has sailed.
Reference: commit 67a04b20b7ee83f1299f9531418adc79f4065a90
Most of these are removing
K: Hash + Eq
and/orS: BuildHasher
where we don't actually need to hash anything.In some cases, we only get away with that because we have a saved hash in each entry
Bucket
. I suspect we still kept the constraints as API protection, in case we ever wanted to change our mind and stop saving the hash. However, there are a few other unconstrained methods that also need the saved hash, likeswap_remove_index
going back long before version 1.0 of the crate, so that ship has sailed.