Removed clippy suspicious_arithmetic_impl allow

This commit is contained in:
Yuri Edward 2021-10-24 21:51:36 +02:00
parent 866cabaa28
commit 9d2639b742
1 changed files with 17 additions and 17 deletions

View File

@ -13,113 +13,113 @@ add_sub_impl!(Mul, mul, ClosedMul;
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1) (Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
const D; for; where; const D; for; where;
self: &'a Scale<T, D>, right: &'b Scale<T, D>, Output = Scale<T, D>; self: &'a Scale<T, D>, right: &'b Scale<T, D>, Output = Scale<T, D>;
#[allow(clippy::suspicious_arithmetic_impl)] { Scale::from(self.vector.component_mul(&right.vector)) }; Scale::from(self.vector.component_mul(&right.vector));
'a, 'b); 'a, 'b);
add_sub_impl!(Mul, mul, ClosedMul; add_sub_impl!(Mul, mul, ClosedMul;
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1) (Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
const D; for; where; const D; for; where;
self: &'a Scale<T, D>, right: Scale<T, D>, Output = Scale<T, D>; self: &'a Scale<T, D>, right: Scale<T, D>, Output = Scale<T, D>;
#[allow(clippy::suspicious_arithmetic_impl)] { Scale::from(self.vector.component_mul(&right.vector)) }; Scale::from(self.vector.component_mul(&right.vector));
'a); 'a);
add_sub_impl!(Mul, mul, ClosedMul; add_sub_impl!(Mul, mul, ClosedMul;
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1) (Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
const D; for; where; const D; for; where;
self: Scale<T, D>, right: &'b Scale<T, D>, Output = Scale<T, D>; self: Scale<T, D>, right: &'b Scale<T, D>, Output = Scale<T, D>;
#[allow(clippy::suspicious_arithmetic_impl)] { Scale::from(self.vector.component_mul(&right.vector)) }; Scale::from(self.vector.component_mul(&right.vector));
'b); 'b);
add_sub_impl!(Mul, mul, ClosedMul; add_sub_impl!(Mul, mul, ClosedMul;
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1) (Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
const D; for; where; const D; for; where;
self: Scale<T, D>, right: Scale<T, D>, Output = Scale<T, D>; self: Scale<T, D>, right: Scale<T, D>, Output = Scale<T, D>;
#[allow(clippy::suspicious_arithmetic_impl)] { Scale::from(self.vector.component_mul(&right.vector)) }; ); Scale::from(self.vector.component_mul(&right.vector)); );
// Scale × scalar // Scale × scalar
add_sub_impl!(Mul, mul, ClosedMul; add_sub_impl!(Mul, mul, ClosedMul;
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1) (Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
const D; for; where; const D; for; where;
self: &'a Scale<T, D>, right: T, Output = Scale<T, D>; self: &'a Scale<T, D>, right: T, Output = Scale<T, D>;
#[allow(clippy::suspicious_arithmetic_impl)] { Scale::from(&self.vector * right) }; Scale::from(&self.vector * right);
'a); 'a);
add_sub_impl!(Mul, mul, ClosedMul; add_sub_impl!(Mul, mul, ClosedMul;
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1) (Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
const D; for; where; const D; for; where;
self: Scale<T, D>, right: T, Output = Scale<T, D>; self: Scale<T, D>, right: T, Output = Scale<T, D>;
#[allow(clippy::suspicious_arithmetic_impl)] { Scale::from(self.vector * right) }; ); Scale::from(self.vector * right); );
// Scale × Point // Scale × Point
add_sub_impl!(Mul, mul, ClosedMul; add_sub_impl!(Mul, mul, ClosedMul;
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1) (Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
const D; for; where; const D; for; where;
self: &'a Scale<T, D>, right: &'b Point<T, D>, Output = Point<T, D>; self: &'a Scale<T, D>, right: &'b Point<T, D>, Output = Point<T, D>;
#[allow(clippy::suspicious_arithmetic_impl)] { Point::from(self.vector.component_mul(&right.coords)) }; Point::from(self.vector.component_mul(&right.coords));
'a, 'b); 'a, 'b);
add_sub_impl!(Mul, mul, ClosedMul; add_sub_impl!(Mul, mul, ClosedMul;
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1) (Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
const D; for; where; const D; for; where;
self: &'a Scale<T, D>, right: Point<T, D>, Output = Point<T, D>; self: &'a Scale<T, D>, right: Point<T, D>, Output = Point<T, D>;
#[allow(clippy::suspicious_arithmetic_impl)] { Point::from(self.vector.component_mul(&right.coords)) }; Point::from(self.vector.component_mul(&right.coords));
'a); 'a);
add_sub_impl!(Mul, mul, ClosedMul; add_sub_impl!(Mul, mul, ClosedMul;
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1) (Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
const D; for; where; const D; for; where;
self: Scale<T, D>, right: &'b Point<T, D>, Output = Point<T, D>; self: Scale<T, D>, right: &'b Point<T, D>, Output = Point<T, D>;
#[allow(clippy::suspicious_arithmetic_impl)] { Point::from(self.vector.component_mul(&right.coords)) }; Point::from(self.vector.component_mul(&right.coords));
'b); 'b);
add_sub_impl!(Mul, mul, ClosedMul; add_sub_impl!(Mul, mul, ClosedMul;
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1) (Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
const D; for; where; const D; for; where;
self: Scale<T, D>, right: Point<T, D>, Output = Point<T, D>; self: Scale<T, D>, right: Point<T, D>, Output = Point<T, D>;
#[allow(clippy::suspicious_arithmetic_impl)] { Point::from(self.vector.component_mul(&right.coords)) }; ); Point::from(self.vector.component_mul(&right.coords)); );
// Scale * Vector // Scale * Vector
add_sub_impl!(Mul, mul, ClosedMul; add_sub_impl!(Mul, mul, ClosedMul;
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1) (Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
const D; for; where; const D; for; where;
self: &'a Scale<T, D>, right: &'b SVector<T, D>, Output = SVector<T, D>; self: &'a Scale<T, D>, right: &'b SVector<T, D>, Output = SVector<T, D>;
#[allow(clippy::suspicious_arithmetic_impl)] { SVector::from(self.vector.component_mul(&right)) }; SVector::from(self.vector.component_mul(&right));
'a, 'b); 'a, 'b);
add_sub_impl!(Mul, mul, ClosedMul; add_sub_impl!(Mul, mul, ClosedMul;
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1) (Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
const D; for; where; const D; for; where;
self: &'a Scale<T, D>, right: SVector<T, D>, Output = SVector<T, D>; self: &'a Scale<T, D>, right: SVector<T, D>, Output = SVector<T, D>;
#[allow(clippy::suspicious_arithmetic_impl)] { SVector::from(self.vector.component_mul(&right)) }; SVector::from(self.vector.component_mul(&right));
'a); 'a);
add_sub_impl!(Mul, mul, ClosedMul; add_sub_impl!(Mul, mul, ClosedMul;
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1) (Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
const D; for; where; const D; for; where;
self: Scale<T, D>, right: &'b SVector<T, D>, Output = SVector<T, D>; self: Scale<T, D>, right: &'b SVector<T, D>, Output = SVector<T, D>;
#[allow(clippy::suspicious_arithmetic_impl)] { SVector::from(self.vector.component_mul(&right)) }; SVector::from(self.vector.component_mul(&right));
'b); 'b);
add_sub_impl!(Mul, mul, ClosedMul; add_sub_impl!(Mul, mul, ClosedMul;
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1) (Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
const D; for; where; const D; for; where;
self: Scale<T, D>, right: SVector<T, D>, Output = SVector<T, D>; self: Scale<T, D>, right: SVector<T, D>, Output = SVector<T, D>;
#[allow(clippy::suspicious_arithmetic_impl)] { SVector::from(self.vector.component_mul(&right)) }; ); SVector::from(self.vector.component_mul(&right)); );
// Scale *= Scale // Scale *= Scale
add_sub_assign_impl!(MulAssign, mul_assign, ClosedMul; add_sub_assign_impl!(MulAssign, mul_assign, ClosedMul;
const D; const D;
self: Scale<T, D>, right: &'b Scale<T, D>; self: Scale<T, D>, right: &'b Scale<T, D>;
#[allow(clippy::suspicious_op_assign_impl)] { self.vector.component_mul_assign(&right.vector); }; self.vector.component_mul_assign(&right.vector);
'b); 'b);
add_sub_assign_impl!(MulAssign, mul_assign, ClosedMul; add_sub_assign_impl!(MulAssign, mul_assign, ClosedMul;
const D; const D;
self: Scale<T, D>, right: Scale<T, D>; self: Scale<T, D>, right: Scale<T, D>;
#[allow(clippy::suspicious_op_assign_impl)] { self.vector.component_mul_assign(&right.vector); }; ); self.vector.component_mul_assign(&right.vector); );
// Scale ×= scalar // Scale ×= scalar
add_sub_assign_impl!(MulAssign, mul_assign, ClosedMul; add_sub_assign_impl!(MulAssign, mul_assign, ClosedMul;
const D; const D;
self: Scale<T, D>, right: T; self: Scale<T, D>, right: T;
#[allow(clippy::suspicious_op_assign_impl)] { self.vector *= right }; ); self.vector *= right; );