From f4a8b4cfa15ae34fa2aef9750e7edbe138e2aeff Mon Sep 17 00:00:00 2001 From: Max Verevkin Date: Sat, 25 Sep 2021 22:05:31 +0300 Subject: [PATCH] deny unused_mut and unused_variables --- src/base/default_allocator.rs | 6 +++--- src/base/matrix.rs | 4 ++-- src/base/matrix_simba.rs | 4 ++-- src/base/ops.rs | 4 ++-- src/lib.rs | 3 ++- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/base/default_allocator.rs b/src/base/default_allocator.rs index b676b5e3..09197bbd 100644 --- a/src/base/default_allocator.rs +++ b/src/base/default_allocator.rs @@ -195,7 +195,7 @@ where unsafe fn reallocate_copy( rto: Const, cto: Const, - mut buf: >::Buffer, + buf: >::Buffer, ) -> ArrayStorage, RTO, CTO> { let mut res = , Const>>::allocate_uninit(rto, cto); @@ -226,7 +226,7 @@ where unsafe fn reallocate_copy( rto: Dynamic, cto: CTo, - mut buf: ArrayStorage, + buf: ArrayStorage, ) -> VecStorage, Dynamic, CTo> { let mut res = >::allocate_uninit(rto, cto); @@ -257,7 +257,7 @@ where unsafe fn reallocate_copy( rto: RTo, cto: Dynamic, - mut buf: ArrayStorage, + buf: ArrayStorage, ) -> VecStorage, RTo, Dynamic> { let mut res = >::allocate_uninit(rto, cto); diff --git a/src/base/matrix.rs b/src/base/matrix.rs index 13413dbf..e530de74 100644 --- a/src/base/matrix.rs +++ b/src/base/matrix.rs @@ -696,7 +696,7 @@ impl> Matrix { #[inline] fn transpose_to_uninit( &self, - status: Status, + _status: Status, out: &mut Matrix, ) where Status: InitStatus, @@ -1392,7 +1392,7 @@ impl> Matrix( &self, - status: Status, + _status: Status, out: &mut Matrix, ) where Status: InitStatus, diff --git a/src/base/matrix_simba.rs b/src/base/matrix_simba.rs index 5c259207..6284ab56 100644 --- a/src/base/matrix_simba.rs +++ b/src/base/matrix_simba.rs @@ -42,14 +42,14 @@ where #[inline] fn replace(&mut self, i: usize, val: Self::Element) { - self.zip_apply(&val, |mut a, b| { + self.zip_apply(&val, |a, b| { a.replace(i, b); }) } #[inline] unsafe fn replace_unchecked(&mut self, i: usize, val: Self::Element) { - self.zip_apply(&val, |mut a, b| { + self.zip_apply(&val, |a, b| { a.replace_unchecked(i, b); }) } diff --git a/src/base/ops.rs b/src/base/ops.rs index 5608119e..6b6d0c45 100644 --- a/src/base/ops.rs +++ b/src/base/ops.rs @@ -146,7 +146,7 @@ macro_rules! componentwise_binop_impl( #[inline] fn $method_to_statically_unchecked_uninit(&self, - status: Status, + _status: Status, rhs: &Matrix, out: &mut Matrix) where Status: InitStatus, @@ -699,7 +699,7 @@ where #[inline(always)] fn xx_mul_to_uninit( &self, - status: Status, + _status: Status, rhs: &Matrix, out: &mut Matrix, dot: impl Fn( diff --git a/src/lib.rs b/src/lib.rs index 5ce5cb18..28701cfa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -71,10 +71,11 @@ an optimized set of tools for computer graphics and physics. Those features incl * Insertion and removal of rows of columns of a matrix. */ -#![allow(unused_variables, unused_mut)] #![deny( missing_docs, nonstandard_style, + unused_variables, + unused_mut, unused_parens, unused_qualifications, unused_results,