diff --git a/src/curves.rs b/src/curves.rs index 2ebe77a..6f64797 100644 --- a/src/curves.rs +++ b/src/curves.rs @@ -427,6 +427,7 @@ macro_rules! new_curve_impl { } } + #[allow(clippy::suspicious_arithmetic_impl)] impl<'a, 'b> Mul<&'b $scalar> for &'a $name { type Output = $name; @@ -537,6 +538,7 @@ macro_rules! new_curve_impl { } } + #[allow(clippy::suspicious_arithmetic_impl)] impl<'a, 'b> Mul<&'b $scalar> for &'a $name_affine { type Output = $name; @@ -730,13 +732,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..406d76c 100644 --- a/src/fields/fp.rs +++ b/src/fields/fp.rs @@ -307,6 +307,7 @@ impl Fp { Fp::montgomery_reduce(r0, r1, r2, r3, r4, r5, r6, r7) } + #[allow(clippy::too_many_arguments)] #[inline(always)] const fn montgomery_reduce( r0: u64, @@ -451,13 +452,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..cc8954a 100644 --- a/src/fields/fq.rs +++ b/src/fields/fq.rs @@ -307,6 +307,7 @@ impl Fq { Fq::montgomery_reduce(r0, r1, r2, r3, r4, r5, r6, r7) } + #[allow(clippy::too_many_arguments)] #[inline(always)] const fn montgomery_reduce( r0: u64, @@ -451,13 +452,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/hashtocurve.rs b/src/hashtocurve.rs index 3fae7b8..387a2ae 100644 --- a/src/hashtocurve.rs +++ b/src/hashtocurve.rs @@ -99,6 +99,7 @@ pub fn iso_map, I: CurveExt>( C::new_jacobian(xo, yo, zo).unwrap() } +#[allow(clippy::many_single_char_names)] pub fn map_to_curve_simple_swu, I: CurveExt>( u: &F, theta: F, diff --git a/src/lib.rs b/src/lib.rs index a0a4750..b48409d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,10 +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, clippy::same_item_push, clippy::upper_case_acronyms, clippy::unknown_clippy_lints diff --git a/src/pallas.rs b/src/pallas.rs index d52b757..e364405 100644 --- a/src/pallas.rs +++ b/src/pallas.rs @@ -15,6 +15,7 @@ pub type Point = Ep; pub type Affine = EpAffine; #[test] +#[allow(clippy::many_single_char_names)] fn test_iso_map() { use crate::arithmetic::CurveExt; use group::Group;