From 6b98dcc743bd04bc2300655c4e800e6b1dd6f911 Mon Sep 17 00:00:00 2001 From: tosti007 Date: Wed, 29 Mar 2023 15:10:35 +0200 Subject: [PATCH] Use with_capacity_and_hasher instead of using base --- library/std/src/collections/hash/set.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/collections/hash/set.rs b/library/std/src/collections/hash/set.rs index 837a18bff6087..d46bc288ebe7e 100644 --- a/library/std/src/collections/hash/set.rs +++ b/library/std/src/collections/hash/set.rs @@ -143,7 +143,7 @@ impl HashSet { #[must_use] #[stable(feature = "rust1", since = "1.0.0")] pub fn with_capacity(capacity: usize) -> HashSet { - HashSet { base: base::HashSet::with_capacity_and_hasher(capacity, Default::default()) } + HashSet::with_capacity_and_hasher(capacity, Default::default()) } }