Skip to content

Commit e2336fe

Browse files
committed
Make it clearer that we're driving some ranges indexed
1 parent 151df5c commit e2336fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/range.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,10 @@ macro_rules! unindexed_range_impl {
152152
where C: UnindexedConsumer<Self::Item>
153153
{
154154
if let Some(len) = self.opt_len() {
155+
// Drive this in indexed mode for better `collect`.
155156
(0..len).into_par_iter()
156157
.map(|i| self.range.start.wrapping_add(i as $t))
157-
.drive_unindexed(consumer)
158+
.drive(consumer)
158159
} else {
159160
bridge_unindexed(IterProducer { range: self.range }, consumer)
160161
}

0 commit comments

Comments
 (0)