clippy: fix #redundant_field_names
This commit is contained in:
parent
fb15658cc9
commit
6293d3375b
|
@ -23,7 +23,7 @@ impl Dynamic {
|
|||
/// A dynamic size equal to `value`.
|
||||
#[inline]
|
||||
pub fn new(value: usize) -> Self {
|
||||
Self { value: value }
|
||||
Self { value }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ impl<N: Scalar, R: Dim, C: Dim, S> Matrix<N, R, C, S> {
|
|||
#[inline]
|
||||
pub unsafe fn from_data_statically_unchecked(data: S) -> Matrix<N, R, C, S> {
|
||||
Matrix {
|
||||
data: data,
|
||||
data,
|
||||
_phantoms: PhantomData,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,11 +41,7 @@ impl<N, R: Dim, C: Dim> VecStorage<N, R, C> {
|
|||
nrows.value() * ncols.value() == data.len(),
|
||||
"Data storage buffer dimension mismatch."
|
||||
);
|
||||
Self {
|
||||
data: data,
|
||||
nrows: nrows,
|
||||
ncols: ncols,
|
||||
}
|
||||
Self { data, nrows, ncols }
|
||||
}
|
||||
|
||||
/// The underlying data storage.
|
||||
|
|
|
@ -139,7 +139,7 @@ impl<N: RealField> Orthographic3<N> {
|
|||
/// ```
|
||||
#[inline]
|
||||
pub fn from_matrix_unchecked(matrix: Matrix4<N>) -> Self {
|
||||
Self { matrix: matrix }
|
||||
Self { matrix }
|
||||
}
|
||||
|
||||
/// Creates a new orthographic projection matrix from an aspect ratio and the vertical field of view.
|
||||
|
|
|
@ -97,7 +97,7 @@ impl<N: RealField> Perspective3<N> {
|
|||
/// projection.
|
||||
#[inline]
|
||||
pub fn from_matrix_unchecked(matrix: Matrix4<N>) -> Self {
|
||||
Self { matrix: matrix }
|
||||
Self { matrix }
|
||||
}
|
||||
|
||||
/// Retrieves the inverse of the underlying homogeneous matrix.
|
||||
|
|
|
@ -135,7 +135,7 @@ where
|
|||
#[deprecated(note = "Use Point::from(vector) instead.")]
|
||||
#[inline]
|
||||
pub fn from_coordinates(coords: VectorN<N, D>) -> Self {
|
||||
Self { coords: coords }
|
||||
Self { coords }
|
||||
}
|
||||
|
||||
/// The dimension of this point.
|
||||
|
|
|
@ -255,7 +255,7 @@ where
|
|||
"Unable to create a rotation from a non-square matrix."
|
||||
);
|
||||
|
||||
Self { matrix: matrix }
|
||||
Self { matrix }
|
||||
}
|
||||
|
||||
/// Transposes `self`.
|
||||
|
|
|
@ -245,7 +245,7 @@ where
|
|||
#[inline]
|
||||
pub fn from_matrix_unchecked(matrix: MatrixN<N, DimNameSum<D, U1>>) -> Self {
|
||||
Transform {
|
||||
matrix: matrix,
|
||||
matrix,
|
||||
_phantom: PhantomData,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ where
|
|||
#[inline]
|
||||
#[deprecated(note = "Use `::from` instead.")]
|
||||
pub fn from_vector(vector: VectorN<N, D>) -> Translation<N, D> {
|
||||
Translation { vector: vector }
|
||||
Translation { vector }
|
||||
}
|
||||
|
||||
/// Inverts `self`.
|
||||
|
|
|
@ -60,11 +60,7 @@ where
|
|||
let mut q = PermutationSequence::identity_generic(min_nrows_ncols);
|
||||
|
||||
if min_nrows_ncols.value() == 0 {
|
||||
return Self {
|
||||
lu: matrix,
|
||||
p: p,
|
||||
q: q,
|
||||
};
|
||||
return Self { lu: matrix, p, q };
|
||||
}
|
||||
|
||||
for i in 0..min_nrows_ncols.value() {
|
||||
|
@ -90,11 +86,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
Self {
|
||||
lu: matrix,
|
||||
p: p,
|
||||
q: q,
|
||||
}
|
||||
Self { lu: matrix, p, q }
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
|
|
|
@ -96,7 +96,7 @@ where
|
|||
let mut p = PermutationSequence::identity_generic(min_nrows_ncols);
|
||||
|
||||
if min_nrows_ncols.value() == 0 {
|
||||
return LU { lu: matrix, p: p };
|
||||
return LU { lu: matrix, p };
|
||||
}
|
||||
|
||||
for i in 0..min_nrows_ncols.value() {
|
||||
|
@ -117,7 +117,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
LU { lu: matrix, p: p }
|
||||
LU { lu: matrix, p }
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
|
|
|
@ -57,20 +57,14 @@ where
|
|||
let mut diag = unsafe { MatrixMN::new_uninitialized_generic(min_nrows_ncols, U1) };
|
||||
|
||||
if min_nrows_ncols.value() == 0 {
|
||||
return QR {
|
||||
qr: matrix,
|
||||
diag: diag,
|
||||
};
|
||||
return QR { qr: matrix, diag };
|
||||
}
|
||||
|
||||
for ite in 0..min_nrows_ncols.value() {
|
||||
householder::clear_column_unchecked(&mut matrix, &mut diag[ite], ite, 0, None);
|
||||
}
|
||||
|
||||
QR {
|
||||
qr: matrix,
|
||||
diag: diag,
|
||||
}
|
||||
QR { qr: matrix, diag }
|
||||
}
|
||||
|
||||
/// Retrieves the upper trapezoidal submatrix `R` of this decomposition.
|
||||
|
|
|
@ -73,10 +73,8 @@ where
|
|||
pub fn try_new(m: MatrixN<N, D>, eps: N::RealField, max_niter: usize) -> Option<Self> {
|
||||
let mut work = unsafe { VectorN::new_uninitialized_generic(m.data.shape().0, U1) };
|
||||
|
||||
Self::do_decompose(m, &mut work, eps, max_niter, true).map(|(q, t)| Schur {
|
||||
q: q.unwrap(),
|
||||
t: t,
|
||||
})
|
||||
Self::do_decompose(m, &mut work, eps, max_niter, true)
|
||||
.map(|(q, t)| Schur { q: q.unwrap(), t })
|
||||
}
|
||||
|
||||
fn do_decompose(
|
||||
|
|
Loading…
Reference in New Issue