Skip to content

Commit

Permalink
Field
Browse files Browse the repository at this point in the history
- Add into_repr method. This is needed at least while we have Bn254 intead of a generic field impl
  • Loading branch information
kevaundray committed Apr 1, 2021
1 parent 4092d47 commit 92ef9b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/noir_field/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ impl FieldElement {
FieldElement(inv)
}

// XXX: This method is used while this field element
// implementation is not generic.
pub fn into_repr(self) -> Fr {
self.0
}

pub fn to_hex(&self) -> String {
let mut bytes = to_bytes!(self.0).unwrap();
bytes.reverse();
Expand Down

0 comments on commit 92ef9b4

Please sign in to comment.