Skip to content

Commit

Permalink
chore: reorder impl members to match trait definition (#1985)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoank101 authored Jan 28, 2025
1 parent 41d6a78 commit 91ad0b0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions crates/zkvm/lib/src/bls12381.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ impl AffinePoint<N> for Bls12381Point {
}
}

fn complete_add_assign(&mut self, other: &Self) {
self.weierstrass_add_assign(other);
}

fn add_assign(&mut self, other: &Self) {
let a = self.limbs_mut();
let b = other.limbs_ref();
Expand All @@ -68,6 +64,10 @@ impl AffinePoint<N> for Bls12381Point {
}
}

fn complete_add_assign(&mut self, other: &Self) {
self.weierstrass_add_assign(other);
}

fn double(&mut self) {
let a = self.limbs_mut();
unsafe {
Expand Down
8 changes: 4 additions & 4 deletions crates/zkvm/lib/src/bn254.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ impl AffinePoint<N> for Bn254Point {
}
}

fn complete_add_assign(&mut self, other: &Self) {
self.weierstrass_add_assign(other);
}

fn add_assign(&mut self, other: &Self) {
let a = self.limbs_mut();
let b = other.limbs_ref();
Expand All @@ -61,6 +57,10 @@ impl AffinePoint<N> for Bn254Point {
}
}

fn complete_add_assign(&mut self, other: &Self) {
self.weierstrass_add_assign(other);
}

fn double(&mut self) {
let a = self.limbs_mut();
unsafe {
Expand Down
10 changes: 5 additions & 5 deletions crates/zkvm/lib/src/secp256k1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ impl AffinePoint<N> for Secp256k1Point {
}
}

fn complete_add_assign(&mut self, other: &Self) {
self.weierstrass_add_assign(other);
}

fn add_assign(&mut self, other: &Self) {
let a = self.limbs_mut();
let b = other.limbs_ref();
Expand All @@ -63,6 +59,10 @@ impl AffinePoint<N> for Secp256k1Point {
}
}

fn complete_add_assign(&mut self, other: &Self) {
self.weierstrass_add_assign(other);
}

fn double(&mut self) {
match &mut self.0 {
WeierstrassPoint::Infinity => (),
Expand All @@ -71,4 +71,4 @@ impl AffinePoint<N> for Secp256k1Point {
},
}
}
}
}
8 changes: 4 additions & 4 deletions crates/zkvm/lib/src/secp256r1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ impl AffinePoint<N> for Secp256r1Point {
}
}

fn complete_add_assign(&mut self, other: &Self) {
self.weierstrass_add_assign(other);
}

fn add_assign(&mut self, other: &Self) {
let a = self.limbs_mut();
let b = other.limbs_ref();
Expand All @@ -63,6 +59,10 @@ impl AffinePoint<N> for Secp256r1Point {
}
}

fn complete_add_assign(&mut self, other: &Self) {
self.weierstrass_add_assign(other);
}

fn double(&mut self) {
match &mut self.0 {
WeierstrassPoint::Infinity => (),
Expand Down

0 comments on commit 91ad0b0

Please sign in to comment.