diff --git a/acir_field/src/generic_ark.rs b/acir_field/src/generic_ark.rs index 378dbe347..68a6f1ea9 100644 --- a/acir_field/src/generic_ark.rs +++ b/acir_field/src/generic_ark.rs @@ -143,6 +143,16 @@ impl From for FieldElement { } } +impl From for FieldElement { + fn from(boolean: bool) -> FieldElement { + if boolean { + FieldElement::one() + } else { + FieldElement::zero() + } + } +} + impl FieldElement { pub fn one() -> FieldElement { FieldElement(F::one())