-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
HashMap.mangle no longer exists #13195
Comments
( |
This was not removed on purpose. However, its benefits are only that you save a rehashing, as with robin hood hashing you must know whether you are inserting or looking up when you probe the table, to know whether or not you need to steal buckets. |
I feel like there's room for a more usable and powerful abstraction here. Something like: pub struct HashWithKey<K, 'a> {
priv hash: SafeHash;
priv key: &'a K;
}
impl<K, 'a> HashWithKey<K, 'a> {
pub fn key(&self) -> &'a K;
fn hash(&self) -> &'a SafeHash;
}
pub fn hash<'a>(&self, k: &'a K) -> HashWithKey<K, 'a> And expose all my methods that take a prehashed key. |
Fixed by #14196 |
Hurray! |
…83, r=Manishearth Fix false positive for `missing_backticks` in footnote references Fixes rust-lang#13183. changelog: Fix false positive for `missing_backticks` in footnote references
There's now no way to be able to conditionally execute expensive functionality when inserting both when the key is not found, and when the key is found, without hashing twice.
See the 0.9 docs for signature.
cc @cgaebel, was this removed on purpose?
The text was updated successfully, but these errors were encountered: