Fix build warnings
This commit is contained in:
parent
581ad354a7
commit
52bf23c5ce
|
@ -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());
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue