From 52bf23c5cea494822070d7733b793fa536dae689 Mon Sep 17 00:00:00 2001 From: Taylor Hornby Date: Wed, 10 Apr 2019 14:18:52 -0600 Subject: [PATCH] Fix build warnings --- src/gadgets/boolean.rs | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/gadgets/boolean.rs b/src/gadgets/boolean.rs index 57718b1e4..a228d396a 100644 --- a/src/gadgets/boolean.rs +++ b/src/gadgets/boolean.rs @@ -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::::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::::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()); }