mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-02-01 08:12:14 +00:00
Fix clippy linter errors in pairing crate
This commit is contained in:
parent
13933d8c51
commit
81786c24c0
@ -955,7 +955,7 @@ pub mod g1 {
|
|||||||
let negyrepr = negy.into_repr();
|
let negyrepr = negy.into_repr();
|
||||||
|
|
||||||
let p = G1Affine {
|
let p = G1Affine {
|
||||||
x: x,
|
x,
|
||||||
y: if yrepr < negyrepr { y } else { negy },
|
y: if yrepr < negyrepr { y } else { negy },
|
||||||
infinity: false,
|
infinity: false,
|
||||||
};
|
};
|
||||||
@ -1637,7 +1637,7 @@ pub mod g2 {
|
|||||||
negy.negate();
|
negy.negate();
|
||||||
|
|
||||||
let p = G2Affine {
|
let p = G2Affine {
|
||||||
x: x,
|
x,
|
||||||
y: if y < negy { y } else { negy },
|
y: if y < negy { y } else { negy },
|
||||||
infinity: false,
|
infinity: false,
|
||||||
};
|
};
|
||||||
|
@ -168,8 +168,8 @@ fn test_fq12_mul_by_014() {
|
|||||||
a.mul_by_014(&c0, &c1, &c5);
|
a.mul_by_014(&c0, &c1, &c5);
|
||||||
b.mul_assign(&Fq12 {
|
b.mul_assign(&Fq12 {
|
||||||
c0: Fq6 {
|
c0: Fq6 {
|
||||||
c0: c0,
|
c0,
|
||||||
c1: c1,
|
c1,
|
||||||
c2: Fq2::zero(),
|
c2: Fq2::zero(),
|
||||||
},
|
},
|
||||||
c1: Fq6 {
|
c1: Fq6 {
|
||||||
|
@ -343,7 +343,7 @@ fn test_fq6_mul_by_1() {
|
|||||||
a.mul_by_1(&c1);
|
a.mul_by_1(&c1);
|
||||||
b.mul_assign(&Fq6 {
|
b.mul_assign(&Fq6 {
|
||||||
c0: Fq2::zero(),
|
c0: Fq2::zero(),
|
||||||
c1: c1,
|
c1,
|
||||||
c2: Fq2::zero(),
|
c2: Fq2::zero(),
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -366,8 +366,8 @@ fn test_fq6_mul_by_01() {
|
|||||||
|
|
||||||
a.mul_by_01(&c0, &c1);
|
a.mul_by_01(&c0, &c1);
|
||||||
b.mul_assign(&Fq6 {
|
b.mul_assign(&Fq6 {
|
||||||
c0: c0,
|
c0,
|
||||||
c1: c1,
|
c1,
|
||||||
c2: Fq2::zero(),
|
c2: Fq2::zero(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ pub trait Engine: ScalarEngine {
|
|||||||
G2: Into<Self::G2Affine>,
|
G2: Into<Self::G2Affine>,
|
||||||
{
|
{
|
||||||
Self::final_exponentiation(&Self::miller_loop(
|
Self::final_exponentiation(&Self::miller_loop(
|
||||||
[(&(p.into().prepare()), &(q.into().prepare()))].into_iter(),
|
[(&(p.into().prepare()), &(q.into().prepare()))].iter(),
|
||||||
)).unwrap()
|
)).unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user