Protect the hashmaps outside of rebuilds.

MozReview-Commit-ID: KACmfw4pZY2
This commit is contained in:
Bobby Holley 2017-09-27 17:01:34 -07:00
parent ef042899d2
commit 039fe176b9
3 changed files with 81 additions and 2 deletions

View file

@ -1027,6 +1027,12 @@ impl<K, V, S> HashMap<K, V, S>
self.table.size()
}
/// Access to the raw buffer backing this hashmap.
pub fn raw_buffer(&self) -> (*const (), usize) {
assert!(self.raw_capacity() != 0);
self.table.raw_buffer()
}
/// Returns true if the map contains no elements.
///
/// # Examples