Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinas committed Jul 2, 2024
1 parent 999b414 commit 32d85e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions src/g1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,11 +636,7 @@ impl From<G1Projective> for Affine<G1Projective> {

impl From<&G1Projective> for Affine<G1Projective> {
fn from(value: &G1Projective) -> Self {
let mut g1 = new_wrapper();
unsafe {
wrapper_g1_norm(&mut g1, &value.0);
}
Self(G1Projective(g1))
value.to_affine()
}
}

Expand Down
6 changes: 1 addition & 5 deletions src/g2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,11 +636,7 @@ impl From<G2Projective> for Affine<G2Projective> {

impl From<&G2Projective> for Affine<G2Projective> {
fn from(value: &G2Projective) -> Self {
let mut g2 = new_wrapper();
unsafe {
wrapper_g2_norm(&mut g2, &value.0);
}
Self(g2.into())
value.to_affine()
}
}

Expand Down

0 comments on commit 32d85e6

Please sign in to comment.