From 5ea2171ea8bc17bc89aeeff7477242bfb7f23932 Mon Sep 17 00:00:00 2001 From: danielmasny Date: Mon, 26 Feb 2024 14:44:59 -0800 Subject: [PATCH] add TryFrom trait bound --- .../protocol/ipa_prf/malicious_security/lagrange.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ipa-core/src/protocol/ipa_prf/malicious_security/lagrange.rs b/ipa-core/src/protocol/ipa_prf/malicious_security/lagrange.rs index 51fb33f97..66e92e782 100644 --- a/ipa-core/src/protocol/ipa_prf/malicious_security/lagrange.rs +++ b/ipa-core/src/protocol/ipa_prf/malicious_security/lagrange.rs @@ -21,7 +21,7 @@ pub struct CanonicalLagrangeDenominator { impl CanonicalLagrangeDenominator where - F: PrimeField, + F: PrimeField + TryFrom, N: ArrayLength, { /// generates canonical Lagrange denominators @@ -70,7 +70,7 @@ pub struct LagrangeTable { impl LagrangeTable where - F: Field, + F: Field + TryFrom, N: ArrayLength, { /// generates a `CanonicalLagrangeTable` from `CanoncialLagrangeDenominators` for a single output point @@ -122,7 +122,7 @@ where /// When the field size is too small for `N` evaluation points fn compute_table_row(x_output: &F, table_row: &mut GenericArray) where - F: Field, + F: Field + TryFrom, N: ArrayLength, { for (entry, i) in table_row.iter_mut().zip(0u64..) { @@ -135,7 +135,7 @@ where impl From> for LagrangeTable where - F: Field, + F: Field + TryFrom, N: ArrayLength, M: ArrayLength, { @@ -209,7 +209,7 @@ mod test { impl From> for Polynomial where - F: Field, + F: Field + TryFrom, N: ArrayLength, { fn from(value: MonomialFormPolynomial) -> Self {