From 8638b796ac990e9d8ba83830c6e34e5cf460af37 Mon Sep 17 00:00:00 2001 From: geo-ant <54497890+geo-ant@users.noreply.github.com> Date: Mon, 24 Oct 2022 08:08:20 +0200 Subject: [PATCH] fix fmt --- src/base/iter.rs | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/src/base/iter.rs b/src/base/iter.rs index cbd2bbf6..925fefbb 100644 --- a/src/base/iter.rs +++ b/src/base/iter.rs @@ -226,7 +226,7 @@ impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorage> Iterator for RowIter<'a } impl<'a, T: Scalar, R: Dim, C: Dim, S: 'a + RawStorage> ExactSizeIterator -for RowIter<'a, T, R, C, S> + for RowIter<'a, T, R, C, S> { #[inline] fn len(&self) -> usize { @@ -257,7 +257,7 @@ impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorageMut> RowIterMut<'a, T, R, } impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorageMut> Iterator -for RowIterMut<'a, T, R, C, S> + for RowIterMut<'a, T, R, C, S> { type Item = MatrixViewMut<'a, T, U1, C, S::RStride, S::CStride>; @@ -284,7 +284,7 @@ for RowIterMut<'a, T, R, C, S> } impl<'a, T: Scalar, R: Dim, C: Dim, S: 'a + RawStorageMut> ExactSizeIterator -for RowIterMut<'a, T, R, C, S> + for RowIterMut<'a, T, R, C, S> { #[inline] fn len(&self) -> usize { @@ -341,7 +341,7 @@ impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorage> Iterator for ColumnIter } impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorage> DoubleEndedIterator -for ColumnIter<'a, T, R, C, S> + for ColumnIter<'a, T, R, C, S> { fn next_back(&mut self) -> Option { debug_assert!(self.range.start <= self.range.end); @@ -357,7 +357,7 @@ for ColumnIter<'a, T, R, C, S> } impl<'a, T: Scalar, R: Dim, C: Dim, S: 'a + RawStorage> ExactSizeIterator -for ColumnIter<'a, T, R, C, S> + for ColumnIter<'a, T, R, C, S> { #[inline] fn len(&self) -> usize { @@ -366,9 +366,9 @@ for ColumnIter<'a, T, R, C, S> } impl<'a, T, R: Dim, Cols: Dim, S: RawStorage> Producer for ColumnIter<'a, T, R, Cols, S> - where - T: Send + Sync + Debug + PartialEq + Clone + 'static, - S: Sync, +where + T: Send + Sync + Debug + PartialEq + Clone + 'static, + S: Sync, { type Item = MatrixSlice<'a, T, R, U1, S::RStride, S::CStride>; type IntoIter = ColumnIter<'a, T, R, Cols, S>; @@ -404,7 +404,11 @@ pub struct ColumnIterMut<'a, T, R: Dim, C: Dim, S: RawStorageMut> { impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorageMut> ColumnIterMut<'a, T, R, C, S> { pub(crate) fn new(mat: &'a mut Matrix) -> Self { let range = 0..mat.ncols(); - ColumnIterMut { mat, range, phantom: Default::default() } + ColumnIterMut { + mat, + range, + phantom: Default::default(), + } } fn ncols(&self) -> usize { @@ -413,7 +417,7 @@ impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorageMut> ColumnIterMut<'a, T, } impl<'a, T, R: Dim, C: Dim, S: 'a + RawStorageMut> Iterator -for ColumnIterMut<'a, T, R, C, S> + for ColumnIterMut<'a, T, R, C, S> { type Item = MatrixViewMut<'a, T, R, U1, S::RStride, S::CStride>; @@ -441,7 +445,7 @@ for ColumnIterMut<'a, T, R, C, S> } impl<'a, T: Scalar, R: Dim, C: Dim, S: 'a + RawStorageMut> ExactSizeIterator -for ColumnIterMut<'a, T, R, C, S> + for ColumnIterMut<'a, T, R, C, S> { #[inline] fn len(&self) -> usize { @@ -450,7 +454,7 @@ for ColumnIterMut<'a, T, R, C, S> } impl<'a, T: Scalar, R: Dim, C: Dim, S: 'a + RawStorageMut> DoubleEndedIterator -for ColumnIterMut<'a, T, R, C, S> + for ColumnIterMut<'a, T, R, C, S> { fn next_back(&mut self) -> Option { debug_assert!(self.range.start <= self.range.end); @@ -466,10 +470,10 @@ for ColumnIterMut<'a, T, R, C, S> } impl<'a, T: Scalar, R: Dim, C: Dim, S: 'a + RawStorageMut> Producer -for ColumnIterMut<'a, T, R, C, S> - where - T: Send + Sync + Debug + PartialEq + Clone, - S: Send + Sync, + for ColumnIterMut<'a, T, R, C, S> +where + T: Send + Sync + Debug + PartialEq + Clone, + S: Send + Sync, { type Item = MatrixSliceMut<'a, T, R, U1, S::RStride, S::CStride>; type IntoIter = ColumnIterMut<'a, T, R, C, S>; @@ -498,4 +502,6 @@ for ColumnIterMut<'a, T, R, C, S> } unsafe impl<'a, T: Scalar, R: Dim, C: Dim, S: 'a + RawStorageMut> Send -for ColumnIterMut<'a, T, R, C, S> {} \ No newline at end of file + for ColumnIterMut<'a, T, R, C, S> +{ +}