Skip to content

Commit

Permalink
Use with_capacity_and_hasher instead of using base
Browse files Browse the repository at this point in the history
  • Loading branch information
tosti007 committed Mar 29, 2023
1 parent cf32b9d commit 6b98dcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/collections/hash/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}

Expand Down

0 comments on commit 6b98dcc

Please sign in to comment.