mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-04 20:03:39 +00:00
clippy: Use *Assign to implement arithmetic::Group trait
This commit is contained in:
parent
d40ed36d50
commit
b06937103d
4 changed files with 9 additions and 10 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue