Skip to content

Commit 6b98dcc

Browse files
committed
Use with_capacity_and_hasher instead of using base
1 parent cf32b9d commit 6b98dcc

File tree

1 file changed

+1
-1
lines changed
  • library/std/src/collections/hash

1 file changed

+1
-1
lines changed

library/std/src/collections/hash/set.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ impl<T> HashSet<T, RandomState> {
143143
#[must_use]
144144
#[stable(feature = "rust1", since = "1.0.0")]
145145
pub fn with_capacity(capacity: usize) -> HashSet<T, RandomState> {
146-
HashSet { base: base::HashSet::with_capacity_and_hasher(capacity, Default::default()) }
146+
HashSet::with_capacity_and_hasher(capacity, Default::default())
147147
}
148148
}
149149

0 commit comments

Comments
 (0)