clippy: Use *Assign to implement arithmetic::Group trait

This commit is contained in:
Jack Grigg 2021-03-03 20:51:43 +00:00
parent d40ed36d50
commit b06937103d
4 changed files with 9 additions and 10 deletions

View file

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

View file

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

View file

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

View file

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