Skip to content

Commit 49b1aeb

Browse files
Add an allocator type parameter to HashMap's and HashSet's Clone implementations.
1 parent 85f42d6 commit 49b1aeb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/map.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ pub struct HashMap<K, V, S = DefaultHashBuilder, A: Allocator + Clone = Global>
194194
pub(crate) table: RawTable<(K, V), A>,
195195
}
196196

197-
impl<K: Clone, V: Clone, S: Clone> Clone for HashMap<K, V, S> {
197+
impl<K: Clone, V: Clone, S: Clone, A: Allocator + Clone> Clone for HashMap<K, V, S, A> {
198198
fn clone(&self) -> Self {
199199
HashMap {
200200
hash_builder: self.hash_builder.clone(),

src/set.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pub struct HashSet<T, S = DefaultHashBuilder, A: Allocator + Clone = Global> {
116116
pub(crate) map: HashMap<T, (), S, A>,
117117
}
118118

119-
impl<T: Clone, S: Clone> Clone for HashSet<T, S> {
119+
impl<T: Clone, S: Clone, A: Allocator + Clone> Clone for HashSet<T, S, A> {
120120
fn clone(&self) -> Self {
121121
HashSet {
122122
map: self.map.clone(),

0 commit comments

Comments
 (0)