Closed
Description
impl<K: Eq + Hash, V, S: BuildHasher> HashMap<K, V, S> {
pub fn hasher(&self) -> &S { &self.hash_builder }
}
impl<T: Eq + Hash, S: BuildHasher> HashSet<T, S> {
pub fn hasher(&self) -> &S { self.map.hasher() }
}
This would let us close contain-rs/linked-hash-map#3, and likely has other (niche) uses for code that needs to reproduce hashes.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
rthomas commentedon Feb 2, 2016
I'd be interested in taking this one on.
rthomas commentedon Feb 9, 2016
As per @gankro s suggestion I've put this behind an unstable feature flag
hashmap_public_hasher
.rthomas commentedon Feb 11, 2016
This has been merged, this issue can now be closed.
apasel422 commentedon Feb 11, 2016
@rthomas This actually needs to stay open to track the stability of the newly added methods.
alexcrichton commentedon Mar 11, 2016
🔔 This issue is now entering its cycle-long final comment period for stabilization in 1.9 🔔
12 remaining items