Skip to content

Commit

Permalink
chore: polish code
Browse files Browse the repository at this point in the history
  • Loading branch information
eigmax committed Aug 11, 2023
1 parent eb12d3f commit cbdd247
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions plonky/src/field_gl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,10 +619,12 @@ mod tests {
fn gl_check_sqrt() {
let mut rng = rand::thread_rng();
let mut x = Fr::rand(&mut rng);
let mut sq_x = x.sqrt().unwrap();
assert_eq!(x, sq_x * sq_x);

sq_x.square();
assert_eq!(x, sq_x);
match x.sqrt() {
Some(mut sq_x) => {
sq_x.square();
assert_eq!(x, sq_x);
},
_ => (), // how it get failed?
}
}
}

0 comments on commit cbdd247

Please sign in to comment.