mirror of
https://github.com/servo/servo.git
synced 2025-07-03 05:23:38 +01:00
Protect the hashmaps outside of rebuilds.
MozReview-Commit-ID: KACmfw4pZY2
This commit is contained in:
parent
ef042899d2
commit
039fe176b9
3 changed files with 81 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue