We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2720d8d + c6a294b commit d993d7aCopy full SHA for d993d7a
src/iter/extend.rs
@@ -1,3 +1,4 @@
1
+use super::noop::NoopConsumer;
2
use super::{IntoParallelIterator, ParallelExtend, ParallelIterator};
3
4
use std::borrow::Cow;
@@ -368,3 +369,13 @@ where
368
369
self.par_extend(par_iter.into_par_iter().cloned())
370
}
371
372
+
373
+/// Collapses all unit items from a parallel iterator into one.
374
+impl ParallelExtend<()> for () {
375
+ fn par_extend<I>(&mut self, par_iter: I)
376
+ where
377
+ I: IntoParallelIterator<Item = ()>,
378
+ {
379
+ par_iter.into_par_iter().drive_unindexed(NoopConsumer)
380
+ }
381
+}
0 commit comments