mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-07 20:30:34 +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()
|
Self::identity()
|
||||||
}
|
}
|
||||||
fn group_add(&mut self, rhs: &Self) {
|
fn group_add(&mut self, rhs: &Self) {
|
||||||
*self = *self + *rhs;
|
*self += *rhs;
|
||||||
}
|
}
|
||||||
fn group_sub(&mut self, rhs: &Self) {
|
fn group_sub(&mut self, rhs: &Self) {
|
||||||
*self = *self - *rhs;
|
*self -= *rhs;
|
||||||
}
|
}
|
||||||
fn group_scale(&mut self, by: &Self::Scalar) {
|
fn group_scale(&mut self, by: &Self::Scalar) {
|
||||||
*self = *self * (*by);
|
*self *= *by;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -451,13 +451,13 @@ impl Group for Fp {
|
||||||
Self::zero()
|
Self::zero()
|
||||||
}
|
}
|
||||||
fn group_add(&mut self, rhs: &Self) {
|
fn group_add(&mut self, rhs: &Self) {
|
||||||
*self = *self + *rhs;
|
*self += *rhs;
|
||||||
}
|
}
|
||||||
fn group_sub(&mut self, rhs: &Self) {
|
fn group_sub(&mut self, rhs: &Self) {
|
||||||
*self = *self - *rhs;
|
*self -= *rhs;
|
||||||
}
|
}
|
||||||
fn group_scale(&mut self, by: &Self::Scalar) {
|
fn group_scale(&mut self, by: &Self::Scalar) {
|
||||||
*self = *self * (*by);
|
*self *= *by;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -451,13 +451,13 @@ impl Group for Fq {
|
||||||
Self::zero()
|
Self::zero()
|
||||||
}
|
}
|
||||||
fn group_add(&mut self, rhs: &Self) {
|
fn group_add(&mut self, rhs: &Self) {
|
||||||
*self = *self + *rhs;
|
*self += *rhs;
|
||||||
}
|
}
|
||||||
fn group_sub(&mut self, rhs: &Self) {
|
fn group_sub(&mut self, rhs: &Self) {
|
||||||
*self = *self - *rhs;
|
*self -= *rhs;
|
||||||
}
|
}
|
||||||
fn group_scale(&mut self, by: &Self::Scalar) {
|
fn group_scale(&mut self, by: &Self::Scalar) {
|
||||||
*self = *self * (*by);
|
*self *= *by;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
#![allow(unknown_lints)]
|
#![allow(unknown_lints)]
|
||||||
#![allow(
|
#![allow(
|
||||||
clippy::op_ref,
|
clippy::op_ref,
|
||||||
clippy::assign_op_pattern,
|
|
||||||
clippy::too_many_arguments,
|
clippy::too_many_arguments,
|
||||||
clippy::suspicious_arithmetic_impl,
|
clippy::suspicious_arithmetic_impl,
|
||||||
clippy::many_single_char_names,
|
clippy::many_single_char_names,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue