Merge pull request #993 from MaxVerevkin/deny-unused-mut

deny unused_mut and unused_variables
This commit is contained in:
Sébastien Crozet 2021-09-26 10:59:27 +02:00 committed by GitHub
commit 5d9dbb62ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 10 deletions

View File

@ -195,7 +195,7 @@ where
unsafe fn reallocate_copy(
rto: Const<RTO>,
cto: Const<CTO>,
mut buf: <Self as Allocator<T, RFrom, CFrom>>::Buffer,
buf: <Self as Allocator<T, RFrom, CFrom>>::Buffer,
) -> ArrayStorage<MaybeUninit<T>, RTO, CTO> {
let mut res = <Self as Allocator<T, Const<RTO>, Const<CTO>>>::allocate_uninit(rto, cto);
@ -226,7 +226,7 @@ where
unsafe fn reallocate_copy(
rto: Dynamic,
cto: CTo,
mut buf: ArrayStorage<T, RFROM, CFROM>,
buf: ArrayStorage<T, RFROM, CFROM>,
) -> VecStorage<MaybeUninit<T>, Dynamic, CTo> {
let mut res = <Self as Allocator<T, Dynamic, CTo>>::allocate_uninit(rto, cto);
@ -257,7 +257,7 @@ where
unsafe fn reallocate_copy(
rto: RTo,
cto: Dynamic,
mut buf: ArrayStorage<T, RFROM, CFROM>,
buf: ArrayStorage<T, RFROM, CFROM>,
) -> VecStorage<MaybeUninit<T>, RTo, Dynamic> {
let mut res = <Self as Allocator<T, RTo, Dynamic>>::allocate_uninit(rto, cto);

View File

@ -693,7 +693,7 @@ impl<T, R: Dim, C: Dim, S: RawStorage<T, R, C>> Matrix<T, R, C, S> {
#[inline]
fn transpose_to_uninit<Status, R2, C2, SB>(
&self,
status: Status,
_status: Status,
out: &mut Matrix<Status::Value, R2, C2, SB>,
) where
Status: InitStatus<T>,
@ -1389,7 +1389,7 @@ impl<T: SimdComplexField, R: Dim, C: Dim, S: RawStorage<T, R, C>> Matrix<T, R, C
#[inline]
fn adjoint_to_uninit<Status, R2, C2, SB>(
&self,
status: Status,
_status: Status,
out: &mut Matrix<Status::Value, R2, C2, SB>,
) where
Status: InitStatus<T>,

View File

@ -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);
})
}

View File

@ -146,7 +146,7 @@ macro_rules! componentwise_binop_impl(
#[inline]
fn $method_to_statically_unchecked_uninit<Status, R2: Dim, C2: Dim, SB,
R3: Dim, C3: Dim, SC>(&self,
status: Status,
_status: Status,
rhs: &Matrix<T, R2, C2, SB>,
out: &mut Matrix<Status::Value, R3, C3, SC>)
where Status: InitStatus<T>,
@ -699,7 +699,7 @@ where
#[inline(always)]
fn xx_mul_to_uninit<Status, R2: Dim, C2: Dim, SB, R3: Dim, C3: Dim, SC>(
&self,
status: Status,
_status: Status,
rhs: &Matrix<T, R2, C2, SB>,
out: &mut Matrix<Status::Value, R3, C3, SC>,
dot: impl Fn(

View File

@ -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,