mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-02-01 08:12:14 +00:00
pairing: Fix various clippy issues
This commit is contained in:
parent
61f052a68f
commit
2f38316359
@ -76,7 +76,7 @@ impl Add for Fq12 {
|
||||
type Output = Self;
|
||||
|
||||
fn add(self, other: Self) -> Self {
|
||||
self + &other
|
||||
self.add(&other)
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ impl Sub for Fq12 {
|
||||
type Output = Self;
|
||||
|
||||
fn sub(self, other: Self) -> Self {
|
||||
self - &other
|
||||
self.sub(&other)
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ impl Mul for Fq12 {
|
||||
type Output = Self;
|
||||
|
||||
fn mul(self, other: Self) -> Self {
|
||||
self * &other
|
||||
self.mul(&other)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ impl Add for Fq2 {
|
||||
type Output = Self;
|
||||
|
||||
fn add(self, other: Self) -> Self {
|
||||
self + &other
|
||||
self.add(&other)
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ impl Sub for Fq2 {
|
||||
type Output = Self;
|
||||
|
||||
fn sub(self, other: Self) -> Self {
|
||||
self - &other
|
||||
self.sub(&other)
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ impl Mul for Fq2 {
|
||||
type Output = Self;
|
||||
|
||||
fn mul(self, other: Self) -> Self {
|
||||
self * &other
|
||||
self.mul(&other)
|
||||
}
|
||||
}
|
||||
|
||||
@ -309,7 +309,7 @@ fn test_fq2_ordering() {
|
||||
c1: Fq::zero(),
|
||||
};
|
||||
|
||||
let mut b = a.clone();
|
||||
let mut b = a;
|
||||
|
||||
assert!(a.cmp(&b) == Ordering::Equal);
|
||||
b.c0.add_assign(&Fq::one());
|
||||
|
@ -139,7 +139,7 @@ impl Add for Fq6 {
|
||||
type Output = Self;
|
||||
|
||||
fn add(self, other: Self) -> Self {
|
||||
self + &other
|
||||
self.add(&other)
|
||||
}
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ impl Sub for Fq6 {
|
||||
type Output = Self;
|
||||
|
||||
fn sub(self, other: Self) -> Self {
|
||||
self - &other
|
||||
self.sub(&other)
|
||||
}
|
||||
}
|
||||
|
||||
@ -205,7 +205,7 @@ impl Mul for Fq6 {
|
||||
type Output = Self;
|
||||
|
||||
fn mul(self, other: Self) -> Self {
|
||||
self * &other
|
||||
self.mul(&other)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ pub fn random_frobenius_tests<F: Field, C: AsRef<[u64]>>(characteristic: C, maxp
|
||||
]);
|
||||
|
||||
for _ in 0..100 {
|
||||
for i in 0..(maxpower + 1) {
|
||||
for i in 0..=maxpower {
|
||||
let mut a = F::random(&mut rng);
|
||||
let mut b = a;
|
||||
|
||||
|
@ -68,7 +68,7 @@ fn random_shl_tests<P: PrimeField>() {
|
||||
for _ in 0..100 {
|
||||
let r = P::random(&mut rng).into_repr();
|
||||
|
||||
for shift in 0..(r.num_bits() + 1) {
|
||||
for shift in 0..=r.num_bits() {
|
||||
let mut r1 = r;
|
||||
let mut r2 = r;
|
||||
|
||||
@ -92,7 +92,7 @@ fn random_shr_tests<P: PrimeField>() {
|
||||
for _ in 0..100 {
|
||||
let r = P::random(&mut rng).into_repr();
|
||||
|
||||
for shift in 0..(r.num_bits() + 1) {
|
||||
for shift in 0..=r.num_bits() {
|
||||
let mut r1 = r;
|
||||
let mut r2 = r;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user