mirror of
https://github.com/servo/servo.git
synced 2025-07-03 05:23:38 +01:00
parent
f7ad19f500
commit
d6bafde971
3 changed files with 10 additions and 90 deletions
|
@ -534,7 +534,7 @@ impl<K, V, S> HashMap<K, V, S>
|
|||
where K: Eq + Hash,
|
||||
S: BuildHasher
|
||||
{
|
||||
pub fn make_hash<X: ?Sized>(&self, x: &X) -> SafeHash
|
||||
fn make_hash<X: ?Sized>(&self, x: &X) -> SafeHash
|
||||
where X: Hash
|
||||
{
|
||||
table::make_hash(&self.hash_builder, x)
|
||||
|
@ -683,17 +683,10 @@ impl<K, V, S> HashMap<K, V, S>
|
|||
|
||||
/// Returns the hash map's raw capacity.
|
||||
#[inline]
|
||||
pub fn raw_capacity(&self) -> usize {
|
||||
fn raw_capacity(&self) -> usize {
|
||||
self.table.capacity()
|
||||
}
|
||||
|
||||
/// Returns a raw pointer to the table's buffer.
|
||||
#[inline]
|
||||
pub fn raw_buffer(&self) -> *const u8 {
|
||||
assert!(self.len() != 0);
|
||||
self.table.raw_buffer()
|
||||
}
|
||||
|
||||
/// Reserves capacity for at least `additional` more elements to be inserted
|
||||
/// in the `HashMap`. The collection may reserve more space to avoid
|
||||
/// frequent reallocations.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue