clippy fix

This commit is contained in:
gluax 2021-02-12 15:22:59 -05:00
parent 500a3e76d2
commit eda78dd968

View File

@ -67,7 +67,7 @@ impl<F: Field + PrimeField> FieldType<F> {
.chars()
.next()
.map(|c| &string[c.len_utf8()..])
.ok_or(FieldError::invalid_field(string.clone(), span.to_owned()))?;
.ok_or_else(|| FieldError::invalid_field(string.clone(), span.to_owned()))?;
value = -F::from_str(&new_string).map_err(|_| FieldError::invalid_field(string, span.to_owned()))?;
} else {
value = F::from_str(&string).map_err(|_| FieldError::invalid_field(string, span.to_owned()))?;