Apply Rustfmt to repeat.rs
@@ -43,7 +43,9 @@ impl<T> IndexedParallelIterator for Repeat<T>
callback.callback(RepeatProducer { repeat: self })
}
- fn len(&mut self) -> usize { usize::MAX }
+ fn len(&mut self) -> usize {
+ usize::MAX
+ }
}
@@ -62,10 +64,8 @@ impl<T: Clone + Send> Producer for RepeatProducer<T> {
}
fn split_at(self, index: usize) -> (Self, Self) {
- (
- RepeatProducer{repeat: self.repeat.clone()},
- RepeatProducer{repeat: self.repeat.clone()}
- )
+ (RepeatProducer { repeat: self.repeat.clone() },
+ RepeatProducer { repeat: self.repeat.clone() })
}
}
@@ -76,7 +76,9 @@ impl<T: Clone + Send> UnindexedProducer for Repeat<T> {
(Repeat { element: self.element.clone() }, Some(Repeat { element: self.element.clone() }))
}
- fn fold_with<F>(self, folder: F) -> F where F: Folder<T> {
+ fn fold_with<F>(self, folder: F) -> F
+ where F: Folder<T>
+ {
folder.consume_iter(RepeatIter { repeat: Repeat { element: self.element } })
}
}
@@ -91,14 +93,20 @@ impl<T: Clone> Iterator for RepeatIter<T> {
type Item = T;
#[inline]
- fn next(&mut self) -> Option<T> { Some(self.repeat.element.clone()) }
+ fn next(&mut self) -> Option<T> {
+ Some(self.repeat.element.clone())
+ }
#[inline]
- fn size_hint(&self) -> (usize, Option<usize>) { (usize::MAX, None) }
+ fn size_hint(&self) -> (usize, Option<usize>) {
+ (usize::MAX, None)
+ }
}
impl<A: Clone> DoubleEndedIterator for RepeatIter<A> {
#[inline]
- fn next_back(&mut self) -> Option<A> { Some(self.repeat.element.clone()) }
+ fn next_back(&mut self) -> Option<A> {
+ Some(self.repeat.element.clone())
+ }
}
impl<T: Clone> ExactSizeIterator for RepeatIter<T> {
