Simplify a few "if" structures

This commit is contained in:
François Garillot
2019-12-02 07:30:54 -08:00
committed by Pratyush Mishra
parent 53a51eb4dc
commit b42d5f8d36
5 changed files with 10 additions and 12 deletions

View File

@@ -275,7 +275,7 @@ impl<F: PrimeField> FieldGadget<F, F> for FpGadget<F> {
impl<F: PrimeField> PartialEq for FpGadget<F> {
fn eq(&self, other: &Self) -> bool {
!self.value.is_none() && !other.value.is_none() && self.value == other.value
self.value.is_some() && other.value.is_some() && self.value == other.value
}
}