@@ -232,11 +232,11 @@ impl<K: Eq + Hash, V: fmt::Debug> fmt::Debug for ParValuesMut<'_, K, V> {
232
232
/// [`into_par_iter`]: /hashbrown/struct.HashMap.html#method.into_par_iter
233
233
/// [`HashMap`]: /hashbrown/struct.HashMap.html
234
234
/// [`IntoParallelIterator`]: https://docs.rs/rayon/1.0/rayon/iter/trait.IntoParallelIterator.html
235
- pub struct IntoParIter < K , V , A : Allocator + Clone = Global > {
235
+ pub struct IntoParIter < K , V , A : Allocator = Global > {
236
236
inner : RawIntoParIter < ( K , V ) , A > ,
237
237
}
238
238
239
- impl < K : Send , V : Send , A : Allocator + Clone + Send > ParallelIterator for IntoParIter < K , V , A > {
239
+ impl < K : Send , V : Send , A : Allocator + Send > ParallelIterator for IntoParIter < K , V , A > {
240
240
type Item = ( K , V ) ;
241
241
242
242
#[ cfg_attr( feature = "inline-more" , inline) ]
@@ -248,9 +248,7 @@ impl<K: Send, V: Send, A: Allocator + Clone + Send> ParallelIterator for IntoPar
248
248
}
249
249
}
250
250
251
- impl < K : fmt:: Debug + Eq + Hash , V : fmt:: Debug , A : Allocator + Clone > fmt:: Debug
252
- for IntoParIter < K , V , A >
253
- {
251
+ impl < K : fmt:: Debug + Eq + Hash , V : fmt:: Debug , A : Allocator > fmt:: Debug for IntoParIter < K , V , A > {
254
252
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
255
253
ParIter {
256
254
inner : unsafe { self . inner . par_iter ( ) } ,
@@ -267,11 +265,11 @@ impl<K: fmt::Debug + Eq + Hash, V: fmt::Debug, A: Allocator + Clone> fmt::Debug
267
265
///
268
266
/// [`par_drain`]: /hashbrown/struct.HashMap.html#method.par_drain
269
267
/// [`HashMap`]: /hashbrown/struct.HashMap.html
270
- pub struct ParDrain < ' a , K , V , A : Allocator + Clone = Global > {
268
+ pub struct ParDrain < ' a , K , V , A : Allocator = Global > {
271
269
inner : RawParDrain < ' a , ( K , V ) , A > ,
272
270
}
273
271
274
- impl < K : Send , V : Send , A : Allocator + Clone + Sync > ParallelIterator for ParDrain < ' _ , K , V , A > {
272
+ impl < K : Send , V : Send , A : Allocator + Sync > ParallelIterator for ParDrain < ' _ , K , V , A > {
275
273
type Item = ( K , V ) ;
276
274
277
275
#[ cfg_attr( feature = "inline-more" , inline) ]
@@ -283,9 +281,7 @@ impl<K: Send, V: Send, A: Allocator + Clone + Sync> ParallelIterator for ParDrai
283
281
}
284
282
}
285
283
286
- impl < K : fmt:: Debug + Eq + Hash , V : fmt:: Debug , A : Allocator + Clone > fmt:: Debug
287
- for ParDrain < ' _ , K , V , A >
288
- {
284
+ impl < K : fmt:: Debug + Eq + Hash , V : fmt:: Debug , A : Allocator > fmt:: Debug for ParDrain < ' _ , K , V , A > {
289
285
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
290
286
ParIter {
291
287
inner : unsafe { self . inner . par_iter ( ) } ,
@@ -295,7 +291,7 @@ impl<K: fmt::Debug + Eq + Hash, V: fmt::Debug, A: Allocator + Clone> fmt::Debug
295
291
}
296
292
}
297
293
298
- impl < K : Sync , V : Sync , S , A : Allocator + Clone > HashMap < K , V , S , A > {
294
+ impl < K : Sync , V : Sync , S , A : Allocator > HashMap < K , V , S , A > {
299
295
/// Visits (potentially in parallel) immutably borrowed keys in an arbitrary order.
300
296
#[ cfg_attr( feature = "inline-more" , inline) ]
301
297
pub fn par_keys ( & self ) -> ParKeys < ' _ , K , V > {
@@ -315,7 +311,7 @@ impl<K: Sync, V: Sync, S, A: Allocator + Clone> HashMap<K, V, S, A> {
315
311
}
316
312
}
317
313
318
- impl < K : Send , V : Send , S , A : Allocator + Clone > HashMap < K , V , S , A > {
314
+ impl < K : Send , V : Send , S , A : Allocator > HashMap < K , V , S , A > {
319
315
/// Visits (potentially in parallel) mutably borrowed values in an arbitrary order.
320
316
#[ cfg_attr( feature = "inline-more" , inline) ]
321
317
pub fn par_values_mut ( & mut self ) -> ParValuesMut < ' _ , K , V > {
@@ -340,7 +336,7 @@ where
340
336
K : Eq + Hash + Sync ,
341
337
V : PartialEq + Sync ,
342
338
S : BuildHasher + Sync ,
343
- A : Allocator + Clone + Sync ,
339
+ A : Allocator + Sync ,
344
340
{
345
341
/// Returns `true` if the map is equal to another,
346
342
/// i.e. both maps contain the same keys mapped to the same values.
@@ -354,9 +350,7 @@ where
354
350
}
355
351
}
356
352
357
- impl < K : Send , V : Send , S , A : Allocator + Clone + Send > IntoParallelIterator
358
- for HashMap < K , V , S , A >
359
- {
353
+ impl < K : Send , V : Send , S , A : Allocator + Send > IntoParallelIterator for HashMap < K , V , S , A > {
360
354
type Item = ( K , V ) ;
361
355
type Iter = IntoParIter < K , V , A > ;
362
356
@@ -368,9 +362,7 @@ impl<K: Send, V: Send, S, A: Allocator + Clone + Send> IntoParallelIterator
368
362
}
369
363
}
370
364
371
- impl < ' a , K : Sync , V : Sync , S , A : Allocator + Clone > IntoParallelIterator
372
- for & ' a HashMap < K , V , S , A >
373
- {
365
+ impl < ' a , K : Sync , V : Sync , S , A : Allocator > IntoParallelIterator for & ' a HashMap < K , V , S , A > {
374
366
type Item = ( & ' a K , & ' a V ) ;
375
367
type Iter = ParIter < ' a , K , V > ;
376
368
@@ -383,9 +375,7 @@ impl<'a, K: Sync, V: Sync, S, A: Allocator + Clone> IntoParallelIterator
383
375
}
384
376
}
385
377
386
- impl < ' a , K : Sync , V : Send , S , A : Allocator + Clone > IntoParallelIterator
387
- for & ' a mut HashMap < K , V , S , A >
388
- {
378
+ impl < ' a , K : Sync , V : Send , S , A : Allocator > IntoParallelIterator for & ' a mut HashMap < K , V , S , A > {
389
379
type Item = ( & ' a K , & ' a mut V ) ;
390
380
type Iter = ParIterMut < ' a , K , V > ;
391
381
@@ -424,7 +414,7 @@ where
424
414
K : Eq + Hash + Send ,
425
415
V : Send ,
426
416
S : BuildHasher ,
427
- A : Allocator + Clone ,
417
+ A : Allocator ,
428
418
{
429
419
fn par_extend < I > ( & mut self , par_iter : I )
430
420
where
@@ -440,7 +430,7 @@ where
440
430
K : Copy + Eq + Hash + Sync ,
441
431
V : Copy + Sync ,
442
432
S : BuildHasher ,
443
- A : Allocator + Clone ,
433
+ A : Allocator ,
444
434
{
445
435
fn par_extend < I > ( & mut self , par_iter : I )
446
436
where
@@ -456,7 +446,7 @@ where
456
446
K : Eq + Hash ,
457
447
S : BuildHasher ,
458
448
I : IntoParallelIterator ,
459
- A : Allocator + Clone ,
449
+ A : Allocator ,
460
450
HashMap < K , V , S , A > : Extend < I :: Item > ,
461
451
{
462
452
let ( list, len) = super :: helpers:: collect ( par_iter) ;
0 commit comments