Skip to content

Commit

Permalink
Fix build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
defuse authored and str4d committed Sep 16, 2019
1 parent 581ad35 commit 52bf23c
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions src/gadgets/boolean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1781,12 +1781,8 @@ mod test {

let value = Some(true);
let b = AllocatedBit::alloc(&mut cs, Some(true)).unwrap();
let allocated_value = AllocatedBit::alloc_conditionally(
cs.namespace(|| "alloc_conditionally"),
value,
&b,
)
.unwrap();
AllocatedBit::alloc_conditionally(cs.namespace(|| "alloc_conditionally"), value, &b)
.unwrap();

assert!(!cs.is_satisfied());
}
Expand All @@ -1798,22 +1794,14 @@ mod test {
//check with false bit
let mut cs = TestConstraintSystem::<Bls12>::new();
let b1 = AllocatedBit::alloc(&mut cs, Some(false)).unwrap();
let allocated_value = AllocatedBit::alloc_conditionally(
cs.namespace(|| "alloc_conditionally"),
value,
&b1,
)
.unwrap();
AllocatedBit::alloc_conditionally(cs.namespace(|| "alloc_conditionally"), value, &b1)
.unwrap();

//check with true bit
let mut cs = TestConstraintSystem::<Bls12>::new();
let b2 = AllocatedBit::alloc(&mut cs, Some(true)).unwrap();
let allocated_value = AllocatedBit::alloc_conditionally(
cs.namespace(|| "alloc_conditionally"),
value,
&b2,
)
.unwrap();
AllocatedBit::alloc_conditionally(cs.namespace(|| "alloc_conditionally"), value, &b2)
.unwrap();

assert!(cs.is_satisfied());
}
Expand Down

0 comments on commit 52bf23c

Please sign in to comment.