Fix build warnings
This commit is contained in:
parent
e391594e9e
commit
caab37c336
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -274,7 +274,7 @@ mod test {
|
|||
"2112827187110048608327330788910224944044097981650120385961435904443901436107",
|
||||
];
|
||||
for length in 300..302 {
|
||||
let mut input: Vec<bool> = (0..length).map(|_| rng.next_u32() % 2 != 0).collect();
|
||||
let input: Vec<bool> = (0..length).map(|_| rng.next_u32() % 2 != 0).collect();
|
||||
|
||||
let mut cs = TestConstraintSystem::<Bls12>::new();
|
||||
|
||||
|
|
Loading…
Reference in New Issue