mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-02-11 17:55:46 +00:00
Fix build warnings
This commit is contained in:
parent
e391594e9e
commit
caab37c336
@ -1781,11 +1781,7 @@ 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"),
|
|
||||||
value,
|
|
||||||
&b,
|
|
||||||
)
|
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
assert!(!cs.is_satisfied());
|
assert!(!cs.is_satisfied());
|
||||||
@ -1798,21 +1794,13 @@ 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"),
|
|
||||||
value,
|
|
||||||
&b1,
|
|
||||||
)
|
|
||||||
.unwrap();
|
.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"),
|
|
||||||
value,
|
|
||||||
&b2,
|
|
||||||
)
|
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
assert!(cs.is_satisfied());
|
assert!(cs.is_satisfied());
|
||||||
|
@ -274,7 +274,7 @@ mod test {
|
|||||||
"2112827187110048608327330788910224944044097981650120385961435904443901436107",
|
"2112827187110048608327330788910224944044097981650120385961435904443901436107",
|
||||||
];
|
];
|
||||||
for length in 300..302 {
|
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();
|
let mut cs = TestConstraintSystem::<Bls12>::new();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user