Browse Source

fix fmt check

master
ValarDragon 4 years ago
committed by Pratyush Mishra
parent
commit
20af44e3c9
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      r1cs-std/src/bits/boolean.rs

+ 3
- 1
r1cs-std/src/bits/boolean.rs

@ -836,7 +836,9 @@ impl CondSelectGadget for Boolean {
match cond { match cond {
Boolean::Constant(true) => Ok(true_value.clone()), Boolean::Constant(true) => Ok(true_value.clone()),
Boolean::Constant(false) => Ok(false_value.clone()), Boolean::Constant(false) => Ok(false_value.clone()),
cond @ Boolean::Not(_) => Self::conditionally_select(cs, &cond.not(), false_value, true_value),
cond @ Boolean::Not(_) => {
Self::conditionally_select(cs, &cond.not(), false_value, true_value)
},
cond @ Boolean::Is(_) => match (true_value, false_value) { cond @ Boolean::Is(_) => match (true_value, false_value) {
(x, &Boolean::Constant(false)) => Boolean::and(cs.ns(|| "and"), cond, x).into(), (x, &Boolean::Constant(false)) => Boolean::and(cs.ns(|| "and"), cond, x).into(),
(&Boolean::Constant(false), x) => Boolean::and(cs.ns(|| "and"), &cond.not(), x), (&Boolean::Constant(false), x) => Boolean::and(cs.ns(|| "and"), &cond.not(), x),

Loading…
Cancel
Save