diff --git a/src/curves.rs b/src/curves.rs index 2ebe77a..86a8fde 100644 --- a/src/curves.rs +++ b/src/curves.rs @@ -730,13 +730,13 @@ macro_rules! new_curve_impl { Self::identity() } fn group_add(&mut self, rhs: &Self) { - *self = *self + *rhs; + *self += *rhs; } fn group_sub(&mut self, rhs: &Self) { - *self = *self - *rhs; + *self -= *rhs; } fn group_scale(&mut self, by: &Self::Scalar) { - *self = *self * (*by); + *self *= *by; } } }; diff --git a/src/fields/fp.rs b/src/fields/fp.rs index 4a09c78..ddfd269 100644 --- a/src/fields/fp.rs +++ b/src/fields/fp.rs @@ -451,13 +451,13 @@ impl Group for Fp { Self::zero() } fn group_add(&mut self, rhs: &Self) { - *self = *self + *rhs; + *self += *rhs; } fn group_sub(&mut self, rhs: &Self) { - *self = *self - *rhs; + *self -= *rhs; } fn group_scale(&mut self, by: &Self::Scalar) { - *self = *self * (*by); + *self *= *by; } } diff --git a/src/fields/fq.rs b/src/fields/fq.rs index f03cb79..a3c0ca1 100644 --- a/src/fields/fq.rs +++ b/src/fields/fq.rs @@ -451,13 +451,13 @@ impl Group for Fq { Self::zero() } fn group_add(&mut self, rhs: &Self) { - *self = *self + *rhs; + *self += *rhs; } fn group_sub(&mut self, rhs: &Self) { - *self = *self - *rhs; + *self -= *rhs; } fn group_scale(&mut self, by: &Self::Scalar) { - *self = *self * (*by); + *self *= *by; } } diff --git a/src/lib.rs b/src/lib.rs index a0a4750..9c95465 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,6 @@ #![allow(unknown_lints)] #![allow( clippy::op_ref, - clippy::assign_op_pattern, clippy::too_many_arguments, clippy::suspicious_arithmetic_impl, clippy::many_single_char_names,