From a990de90fe41456a23e58bd087d2f107d321f3a1 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Fri, 19 Jul 2024 16:37:58 +0400 Subject: Deleted vendor folder --- vendor/rayon/src/par_either.rs | 74 ------------------------------------------ 1 file changed, 74 deletions(-) delete mode 100644 vendor/rayon/src/par_either.rs (limited to 'vendor/rayon/src/par_either.rs') diff --git a/vendor/rayon/src/par_either.rs b/vendor/rayon/src/par_either.rs deleted file mode 100644 index a19ce53..0000000 --- a/vendor/rayon/src/par_either.rs +++ /dev/null @@ -1,74 +0,0 @@ -use crate::iter::plumbing::*; -use crate::iter::Either::{Left, Right}; -use crate::iter::*; - -/// `Either` is a parallel iterator if both `L` and `R` are parallel iterators. -impl ParallelIterator for Either -where - L: ParallelIterator, - R: ParallelIterator, -{ - type Item = L::Item; - - fn drive_unindexed(self, consumer: C) -> C::Result - where - C: UnindexedConsumer, - { - match self { - Left(iter) => iter.drive_unindexed(consumer), - Right(iter) => iter.drive_unindexed(consumer), - } - } - - fn opt_len(&self) -> Option { - self.as_ref().either(L::opt_len, R::opt_len) - } -} - -impl IndexedParallelIterator for Either -where - L: IndexedParallelIterator, - R: IndexedParallelIterator, -{ - fn drive(self, consumer: C) -> C::Result - where - C: Consumer, - { - match self { - Left(iter) => iter.drive(consumer), - Right(iter) => iter.drive(consumer), - } - } - - fn len(&self) -> usize { - self.as_ref().either(L::len, R::len) - } - - fn with_producer(self, callback: CB) -> CB::Output - where - CB: ProducerCallback, - { - match self { - Left(iter) => iter.with_producer(callback), - Right(iter) => iter.with_producer(callback), - } - } -} - -/// `Either` can be extended if both `L` and `R` are parallel extendable. -impl ParallelExtend for Either -where - L: ParallelExtend, - R: ParallelExtend, - T: Send, -{ - fn par_extend(&mut self, par_iter: I) - where - I: IntoParallelIterator, - { - match self.as_mut() { - Left(collection) => collection.par_extend(par_iter), - Right(collection) => collection.par_extend(par_iter), - } - } -} -- cgit v1.2.3