Fix build warnings

This commit is contained in:
Taylor Hornby 2019-04-10 14:18:52 -06:00 committed by Jack Grigg
parent 581ad354a7
commit 52bf23c5ce
1 changed files with 6 additions and 18 deletions

View File

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