diff --git a/src/geometry/isometry_ops.rs b/src/geometry/isometry_ops.rs index e676d492..aaaefc6f 100644 --- a/src/geometry/isometry_ops.rs +++ b/src/geometry/isometry_ops.rs @@ -169,7 +169,7 @@ isometry_binop_assign_impl_all!( MulAssign, mul_assign; self: Isometry, rhs: Translation; [val] => *self *= &rhs; - [ref] => { + [ref] => #[allow(clippy::suspicious_op_assign_impl)] { let shift = self.rotation.transform_vector(&rhs.vector); self.translation.vector += shift; }; @@ -192,7 +192,7 @@ isometry_binop_assign_impl_all!( DivAssign, div_assign; self: Isometry, rhs: Isometry; [val] => *self /= &rhs; - [ref] => *self *= rhs.inverse(); + [ref] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; ); // Isometry ×= R @@ -210,8 +210,8 @@ md_assign_impl_all!( (D, U1), (D, D) for D: DimName; self: Isometry>, rhs: Rotation; // FIXME: don't invert explicitly? - [val] => *self *= rhs.inverse(); - [ref] => *self *= rhs.inverse(); + [val] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; + [ref] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; ); md_assign_impl_all!( @@ -227,8 +227,8 @@ md_assign_impl_all!( (U3, U3), (U3, U3) for; self: Isometry>, rhs: UnitQuaternion; // FIXME: don't invert explicitly? - [val] => *self *= rhs.inverse(); - [ref] => *self *= rhs.inverse(); + [val] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; + [ref] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; ); md_assign_impl_all!( @@ -244,8 +244,8 @@ md_assign_impl_all!( (U2, U2), (U2, U2) for; self: Isometry>, rhs: UnitComplex; // FIXME: don't invert explicitly? - [val] => *self *= rhs.inverse(); - [ref] => *self *= rhs.inverse(); + [val] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; + [ref] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; ); // Isometry × Point diff --git a/src/geometry/similarity_ops.rs b/src/geometry/similarity_ops.rs index d011871d..09d40f05 100644 --- a/src/geometry/similarity_ops.rs +++ b/src/geometry/similarity_ops.rs @@ -192,7 +192,7 @@ similarity_binop_assign_impl_all!( self: Similarity, rhs: Similarity; [val] => *self /= &rhs; // FIXME: don't invert explicitly. - [ref] => *self *= rhs.inverse(); + [ref] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; ); // Similarity ×= Isometry @@ -213,7 +213,7 @@ similarity_binop_assign_impl_all!( self: Similarity, rhs: Isometry; [val] => *self /= &rhs; // FIXME: don't invert explicitly. - [ref] => *self *= rhs.inverse(); + [ref] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; ); // Similarity ×= R @@ -231,8 +231,8 @@ md_assign_impl_all!( (D, U1), (D, D) for D: DimName; self: Similarity>, rhs: Rotation; // FIXME: don't invert explicitly? - [val] => *self *= rhs.inverse(); - [ref] => *self *= rhs.inverse(); + [val] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; + [ref] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; ); md_assign_impl_all!( @@ -248,8 +248,8 @@ md_assign_impl_all!( (U3, U3), (U3, U3) for; self: Similarity>, rhs: UnitQuaternion; // FIXME: don't invert explicitly? - [val] => *self *= rhs.inverse(); - [ref] => *self *= rhs.inverse(); + [val] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; + [ref] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; ); md_assign_impl_all!( @@ -265,8 +265,8 @@ md_assign_impl_all!( (U2, U2), (U2, U2) for; self: Similarity>, rhs: UnitComplex; // FIXME: don't invert explicitly? - [val] => *self *= rhs.inverse(); - [ref] => *self *= rhs.inverse(); + [val] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; + [ref] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; ); // Similarity × Isometry diff --git a/src/geometry/transform_ops.rs b/src/geometry/transform_ops.rs index 6986a90a..2fe9d245 100644 --- a/src/geometry/transform_ops.rs +++ b/src/geometry/transform_ops.rs @@ -491,8 +491,8 @@ md_assign_impl_all!( (DimNameSum, DimNameSum), (DimNameSum, DimNameSum) for D: DimNameAdd, CA: SuperTCategoryOf, CB: SubTCategoryOf; self: Transform, rhs: Transform; - [val] => *self *= rhs.inverse(); - [ref] => *self *= rhs.clone().inverse(); + [val] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; + [ref] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.clone().inverse() }; ); // // Transform ÷= Similarity @@ -521,8 +521,8 @@ md_assign_impl_all!( DivAssign, div_assign where N: RealField; (DimNameSum, DimNameSum), (D, U1) for D: DimNameAdd, C: TCategory; self: Transform, rhs: Translation; - [val] => *self *= rhs.inverse(); - [ref] => *self *= rhs.inverse(); + [val] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; + [ref] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; ); // Transform ÷= Rotation @@ -530,8 +530,8 @@ md_assign_impl_all!( DivAssign, div_assign where N: RealField; (DimNameSum, DimNameSum), (D, D) for D: DimNameAdd, C: TCategory; self: Transform, rhs: Rotation; - [val] => *self *= rhs.inverse(); - [ref] => *self *= rhs.inverse(); + [val] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; + [ref] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; ); // Transform ÷= UnitQuaternion @@ -539,6 +539,6 @@ md_assign_impl_all!( DivAssign, div_assign where N: RealField; (U4, U4), (U4, U1) for C: TCategory; self: Transform, rhs: UnitQuaternion; - [val] => *self *= rhs.inverse(); - [ref] => *self *= rhs.inverse(); + [val] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; + [ref] => #[allow(clippy::suspicious_op_assign_impl)] { *self *= rhs.inverse() }; ); diff --git a/src/geometry/translation_ops.rs b/src/geometry/translation_ops.rs index 8d543c20..acd1795f 100644 --- a/src/geometry/translation_ops.rs +++ b/src/geometry/translation_ops.rs @@ -88,21 +88,21 @@ add_sub_impl!(Mul, mul, ClosedAdd; add_sub_assign_impl!(MulAssign, mul_assign, ClosedAdd; (D, U1), (D, U1) for D: DimName; self: Translation, right: &'b Translation; - #[allow(clippy::suspicious_arithmetic_impl)] { self.vector += &right.vector }; + #[allow(clippy::suspicious_op_assign_impl)] { self.vector += &right.vector }; 'b); add_sub_assign_impl!(MulAssign, mul_assign, ClosedAdd; (D, U1), (D, U1) for D: DimName; self: Translation, right: Translation; - #[allow(clippy::suspicious_arithmetic_impl)] { self.vector += right.vector }; ); + #[allow(clippy::suspicious_op_assign_impl)] { self.vector += right.vector }; ); add_sub_assign_impl!(DivAssign, div_assign, ClosedSub; (D, U1), (D, U1) for D: DimName; self: Translation, right: &'b Translation; - #[allow(clippy::suspicious_arithmetic_impl)] { self.vector -= &right.vector }; + #[allow(clippy::suspicious_op_assign_impl)] { self.vector -= &right.vector }; 'b); add_sub_assign_impl!(DivAssign, div_assign, ClosedSub; (D, U1), (D, U1) for D: DimName; self: Translation, right: Translation; - #[allow(clippy::suspicious_arithmetic_impl)] { self.vector -= right.vector }; ); + #[allow(clippy::suspicious_op_assign_impl)] { self.vector -= right.vector }; );