Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(zkevm): reorder impl members to match trait definition #1985

Merged
merged 6 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading