Skip to content

Commit 36eeeab

Browse files
committed
cargo fmt
1 parent 7247db6 commit 36eeeab

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

src/macros.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,14 @@ macro_rules! iterator_methods {
103103
}
104104

105105
fn collect<C>(self) -> C
106-
where C: FromIterator<Self::Item>
106+
where
107+
C: FromIterator<Self::Item>,
107108
{
108109
// NB: forwarding this directly to standard iterators will
109110
// allow it to leverage unstable traits like `TrustedLen`.
110111
self.iter.map($map_elt).collect()
111112
}
112-
}
113+
};
113114
}
114115

115116
macro_rules! double_ended_iterator_methods {
@@ -119,5 +120,5 @@ macro_rules! double_ended_iterator_methods {
119120
fn next_back(&mut self) -> Option<Self::Item> {
120121
self.iter.next_back().map($map_elt)
121122
}
122-
}
123+
};
123124
}

src/rayon/mod.rs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ macro_rules! parallel_iterator_methods {
1010
// $map_elt is the mapping function from the underlying iterator's element
1111
($map_elt:expr) => {
1212
fn drive_unindexed<C>(self, consumer: C) -> C::Result
13-
where C: UnindexedConsumer<Self::Item>
13+
where
14+
C: UnindexedConsumer<Self::Item>,
1415
{
15-
self.entries.into_par_iter()
16+
self.entries
17+
.into_par_iter()
1618
.map($map_elt)
1719
.drive_unindexed(consumer)
1820
}
@@ -23,7 +25,7 @@ macro_rules! parallel_iterator_methods {
2325
fn opt_len(&self) -> Option<usize> {
2426
Some(self.entries.len())
2527
}
26-
}
28+
};
2729
}
2830

2931
// generate `IndexedParallelIterator` methods by just forwarding to the underlying
@@ -32,25 +34,26 @@ macro_rules! indexed_parallel_iterator_methods {
3234
// $map_elt is the mapping function from the underlying iterator's element
3335
($map_elt:expr) => {
3436
fn drive<C>(self, consumer: C) -> C::Result
35-
where C: Consumer<Self::Item>
37+
where
38+
C: Consumer<Self::Item>,
3639
{
37-
self.entries.into_par_iter()
38-
.map($map_elt)
39-
.drive(consumer)
40+
self.entries.into_par_iter().map($map_elt).drive(consumer)
4041
}
4142

4243
fn len(&self) -> usize {
4344
self.entries.len()
4445
}
4546

4647
fn with_producer<CB>(self, callback: CB) -> CB::Output
47-
where CB: ProducerCallback<Self::Item>
48+
where
49+
CB: ProducerCallback<Self::Item>,
4850
{
49-
self.entries.into_par_iter()
51+
self.entries
52+
.into_par_iter()
5053
.map($map_elt)
5154
.with_producer(callback)
5255
}
53-
}
56+
};
5457
}
5558

5659
pub mod map;

0 commit comments

Comments
 (0)