Skip to content

Commit

Permalink
make rayon feature compile
Browse files Browse the repository at this point in the history
  • Loading branch information
djugei committed Sep 13, 2024
1 parent 9d8276b commit c37fa99
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/rayon.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use rayon::iter::plumbing::{Consumer, Folder, Producer, ProducerCallback, UnindexedConsumer};
use rayon::iter::{IndexedParallelIterator, ParallelIterator};

use crate::{ProgressBar, ProgressBarIter};
use crate::{iter, ProgressBar, ProgressBarIter};

/// Wraps a Rayon parallel iterator.
///
Expand Down Expand Up @@ -41,7 +41,11 @@ where

impl<S: Send, T: ParallelIterator<Item = S>> ParallelProgressIterator for T {
fn progress_with(self, progress: ProgressBar) -> ProgressBarIter<Self> {
ProgressBarIter { it: self, progress }
ProgressBarIter {
it: self,
progress,
hold_max: iter::RingBufWrap::new(),
}
}
}

Expand Down Expand Up @@ -99,6 +103,7 @@ impl<T, P: Producer<Item = T>> Producer for ProgressProducer<P> {
ProgressBarIter {
it: self.base.into_iter(),
progress: self.progress,
hold_max: iter::RingBufWrap::new(),
}
}

Expand Down

0 comments on commit c37fa99

Please # to comment.