From 901ef2381ea9ea081dae8180c9866fde324556d1 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 3 Mar 2021 21:33:37 +0000 Subject: [PATCH] clippy: Allow binary operators in Mul impls for curves We use binary operators specifically to implement constant-time scalar multiplication. --- src/curves.rs | 2 ++ src/lib.rs | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/curves.rs b/src/curves.rs index 86a8fde..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; diff --git a/src/lib.rs b/src/lib.rs index 3e57edd..b48409d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,6 @@ #![allow(unknown_lints)] #![allow( clippy::op_ref, - clippy::suspicious_arithmetic_impl, clippy::same_item_push, clippy::upper_case_acronyms, clippy::unknown_clippy_lints