diff --git a/src/base/conversion.rs b/src/base/conversion.rs index 20553257..02f72a43 100644 --- a/src/base/conversion.rs +++ b/src/base/conversion.rs @@ -16,8 +16,8 @@ use crate::base::dimension::{ use crate::base::iter::{MatrixIter, MatrixIterMut}; use crate::base::storage::{IsContiguous, RawStorage, RawStorageMut}; use crate::base::{ - ArrayStorage, DVectorView, DVectorViewMut, DefaultAllocator, Matrix, MatrixView, - MatrixViewMut, OMatrix, Scalar, + ArrayStorage, DVectorView, DVectorViewMut, DefaultAllocator, Matrix, MatrixView, MatrixViewMut, + OMatrix, Scalar, }; #[cfg(any(feature = "std", feature = "alloc"))] use crate::base::{DVector, RowDVector, VecStorage}; @@ -380,10 +380,8 @@ where RStride: Dim, CStride: Dim, S: RawStorage, - ShapeConstraint: DimEq - + DimEq - + DimEq - + DimEq, + ShapeConstraint: + DimEq + DimEq + DimEq + DimEq, { fn from(m: &'a Matrix) -> Self { let (row, col) = m.shape_generic(); @@ -416,10 +414,8 @@ where RStride: Dim, CStride: Dim, S: RawStorage, - ShapeConstraint: DimEq - + DimEq - + DimEq - + DimEq, + ShapeConstraint: + DimEq + DimEq + DimEq + DimEq, { fn from(m: &'a mut Matrix) -> Self { let (row, col) = m.shape_generic(); @@ -452,10 +448,8 @@ where RStride: Dim, CStride: Dim, S: RawStorageMut, - ShapeConstraint: DimEq - + DimEq - + DimEq - + DimEq, + ShapeConstraint: + DimEq + DimEq + DimEq + DimEq, { fn from(m: &'a mut Matrix) -> Self { let (row, col) = m.shape_generic(); diff --git a/src/base/matrix_view.rs b/src/base/matrix_view.rs index 210e7a57..c3dbd215 100644 --- a/src/base/matrix_view.rs +++ b/src/base/matrix_view.rs @@ -986,9 +986,9 @@ impl> Matrix { rows: RowRange, cols: ColRange, ) -> MatrixView<'_, T, RowRange::Size, ColRange::Size, S::RStride, S::CStride> - where - RowRange: DimRange, - ColRange: DimRange, + where + RowRange: DimRange, + ColRange: DimRange, { let (nrows, ncols) = self.shape_generic(); self.generic_view( @@ -1043,9 +1043,9 @@ impl> Matrix { rows: RowRange, cols: ColRange, ) -> MatrixViewMut<'_, T, RowRange::Size, ColRange::Size, S::RStride, S::CStride> - where - RowRange: DimRange, - ColRange: DimRange, + where + RowRange: DimRange, + ColRange: DimRange, { let (nrows, ncols) = self.shape_generic(); self.generic_view_mut( @@ -1122,13 +1122,18 @@ where /// let dynamic_view: DMatrixSlice = matrix.as_view(); /// let static_view_from_dyn: SMatrixView = dynamic_view.as_view(); /// ``` - pub fn as_view(&self) -> MatrixView<'_, T, RView, CView, RViewStride, CViewStride> + pub fn as_view( + &self, + ) -> MatrixView<'_, T, RView, CView, RViewStride, CViewStride> where RView: Dim, CView: Dim, RViewStride: Dim, CViewStride: Dim, - ShapeConstraint: DimEq + DimEq + DimEq + DimEq + ShapeConstraint: DimEq + + DimEq + + DimEq + + DimEq, { // Defer to (&matrix).into() self.into() @@ -1164,13 +1169,18 @@ where /// let mut dynamic_view: DMatrixViewMut = matrix.as_view_mut(); /// let static_view_from_dyn: SMatrixViewMut = dynamic_view.as_view_mut(); /// ``` - pub fn as_view_mut(&mut self) -> MatrixViewMut<'_, T, RView, CView, RViewStride, CViewStride> - where - RView: Dim, - CView: Dim, - RViewStride: Dim, - CViewStride: Dim, - ShapeConstraint: DimEq + DimEq + DimEq + DimEq + pub fn as_view_mut( + &mut self, + ) -> MatrixViewMut<'_, T, RView, CView, RViewStride, CViewStride> + where + RView: Dim, + CView: Dim, + RViewStride: Dim, + CViewStride: Dim, + ShapeConstraint: DimEq + + DimEq + + DimEq + + DimEq, { // Defer to (&mut matrix).into() self.into() diff --git a/src/linalg/schur.rs b/src/linalg/schur.rs index 3388e7cf..06d8426b 100644 --- a/src/linalg/schur.rs +++ b/src/linalg/schur.rs @@ -211,10 +211,12 @@ where { let mut work = work.rows_mut(0, end + 1); - refl.reflect(&mut t.generic_view_mut( - (m, m), - (Const::<2>, Dynamic::new(dim.value() - m)), - )); + refl.reflect( + &mut t.generic_view_mut( + (m, m), + (Const::<2>, Dynamic::new(dim.value() - m)), + ), + ); refl.reflect_rows( &mut t.generic_view_mut((0, m), (Dynamic::new(end + 1), Const::<2>)), &mut work, @@ -222,10 +224,7 @@ where } if let Some(ref mut q) = q { - refl.reflect_rows( - &mut q.generic_view_mut((0, m), (dim, Const::<2>)), - work, - ); + refl.reflect_rows(&mut q.generic_view_mut((0, m), (dim, Const::<2>)), work); } } } else { diff --git a/tests/core/matrix_slice.rs b/tests/core/matrix_slice.rs index ce3a1c37..4ce49d02 100644 --- a/tests/core/matrix_slice.rs +++ b/tests/core/matrix_slice.rs @@ -3,8 +3,8 @@ use na::{ DMatrix, DMatrixView, DMatrixViewMut, Matrix2, Matrix2x3, Matrix2x4, Matrix2x6, Matrix3, Matrix3x2, Matrix3x4, Matrix4x2, Matrix6x2, MatrixView2, MatrixView2x3, MatrixView2xX, - MatrixView3, MatrixView3x2, MatrixViewMut2, MatrixViewMut2x3, MatrixViewMut2xX, - MatrixViewMut3, MatrixViewMut3x2, MatrixViewMutXx3, MatrixViewXx3, RowVector4, Vector3, + MatrixView3, MatrixView3x2, MatrixViewMut2, MatrixViewMut2x3, MatrixViewMut2xX, MatrixViewMut3, + MatrixViewMut3x2, MatrixViewMutXx3, MatrixViewXx3, RowVector4, Vector3, }; #[test]