Use with_capacity_and_hasher instead of using base
This commit is contained in:
parent
cf32b9de1e
commit
6b98dcc743
1 changed files with 1 additions and 1 deletions
|
|
@ -143,7 +143,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…
Add table
Add a link
Reference in a new issue