bls12_381: Silence clippy::eq_op in tests that trigger it

The tests are explicitly checking that the operator implementations work
correctly for equal LHS and RHS.
This commit is contained in:
Jack Grigg 2020-01-14 20:53:44 -05:00
parent 394b6f91a9
commit e15fea2757
2 changed files with 6 additions and 0 deletions

View File

@ -823,6 +823,7 @@ fn test_is_on_curve() {
}
#[test]
#[allow(clippy::eq_op)]
fn test_affine_point_equality() {
let a = G1Affine::generator();
let b = G1Affine::identity();
@ -834,6 +835,7 @@ fn test_affine_point_equality() {
}
#[test]
#[allow(clippy::eq_op)]
fn test_projective_point_equality() {
let a = G1Projective::generator();
let b = G1Projective::identity();
@ -1224,6 +1226,7 @@ fn test_mixed_addition() {
}
#[test]
#[allow(clippy::eq_op)]
fn test_projective_negation_and_subtraction() {
let a = G1Projective::generator().double();
assert_eq!(a + (-a), G1Projective::identity());

View File

@ -925,6 +925,7 @@ fn test_is_on_curve() {
}
#[test]
#[allow(clippy::eq_op)]
fn test_affine_point_equality() {
let a = G2Affine::generator();
let b = G2Affine::identity();
@ -936,6 +937,7 @@ fn test_affine_point_equality() {
}
#[test]
#[allow(clippy::eq_op)]
fn test_projective_point_equality() {
let a = G2Projective::generator();
let b = G2Projective::identity();
@ -1452,6 +1454,7 @@ fn test_mixed_addition() {
}
#[test]
#[allow(clippy::eq_op)]
fn test_projective_negation_and_subtraction() {
let a = G2Projective::generator().double();
assert_eq!(a + (-a), G2Projective::identity());