mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Auto merge of #109214 - tosti007:std_collection_hash_new_rework, r=workingjubilee
Use `HashMap::with_capacity_and_hasher` instead of using base Cleans up the internal logic for `HashMap::with_capacity` slightly.
This commit is contained in:
commit
fc01a7432b
@ -144,7 +144,7 @@ impl<T> HashSet<T, RandomState> {
|
||||
#[must_use]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub fn with_capacity(capacity: usize) -> HashSet<T, RandomState> {
|
||||
HashSet { base: base::HashSet::with_capacity_and_hasher(capacity, Default::default()) }
|
||||
HashSet::with_capacity_and_hasher(capacity, Default::default())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user