no_std support for ff crate

This commit is contained in:
Jack Grigg
2019-05-15 20:43:24 +01:00
parent 1c9f5742fa
commit ec2c304efd
5 changed files with 61 additions and 52 deletions

View File

@@ -314,7 +314,7 @@ impl PrimeField for Fr {
fn from_repr(repr: FrRepr) -> Result<Self, PrimeFieldDecodingError> {
if repr.0[0] >= (MODULUS_R.0 as u64) {
Err(PrimeFieldDecodingError::NotInField(format!("{}", repr)))
Err(PrimeFieldDecodingError::NotInField)
} else {
Ok(Fr(Wrapping(repr.0[0] as u32)))
}