fix api also

This commit is contained in:
NikVolf
2019-03-26 16:08:53 +03:00
parent 6e5e26a3bc
commit 8cb6e45ca6
2 changed files with 6 additions and 11 deletions
+3 -7
View File
@@ -73,13 +73,9 @@ macro_rules! field_impl {
}
/// Converts a U256 to an Fr regardless of modulus.
pub fn new_mul_factor(mut a: U256) -> Option<Self> {
if true {
a.mul(&U256::from($rsquared), &U256::from($modulus), $inv);
Some($name(a))
} else {
None
}
pub fn new_mul_factor(mut a: U256) -> Self {
a.mul(&U256::from($rsquared), &U256::from($modulus), $inv);
$name(a)
}
pub fn interpret(buf: &[u8; 64]) -> Self {