From 614d784b29350b6d7c2b626cab54930b3f645d7f Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 2 Aug 2019 12:00:15 +0100 Subject: [PATCH] Rename into_ -> to_ where &self is used. --- src/gadgets/num.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gadgets/num.rs b/src/gadgets/num.rs index 81f4fb33b..eeccceff5 100644 --- a/src/gadgets/num.rs +++ b/src/gadgets/num.rs @@ -66,7 +66,7 @@ impl AllocatedNum { /// order, requiring that the representation /// strictly exists "in the field" (i.e., a /// congruency is not allowed.) - pub fn into_bits_le_strict(&self, mut cs: CS) -> Result, SynthesisError> + pub fn to_bits_le_strict(&self, mut cs: CS) -> Result, SynthesisError> where CS: ConstraintSystem, { @@ -189,7 +189,7 @@ impl AllocatedNum { /// Convert the allocated number into its little-endian representation. /// Note that this does not strongly enforce that the commitment is /// "in the field." - pub fn into_bits_le(&self, mut cs: CS) -> Result, SynthesisError> + pub fn to_bits_le(&self, mut cs: CS) -> Result, SynthesisError> where CS: ConstraintSystem, { @@ -522,7 +522,7 @@ mod test { let mut cs = TestConstraintSystem::::new(); let n = AllocatedNum::alloc(&mut cs, || Ok(negone)).unwrap(); - n.into_bits_le_strict(&mut cs).unwrap(); + n.to_bits_le_strict(&mut cs).unwrap(); assert!(cs.is_satisfied()); @@ -550,9 +550,9 @@ mod test { let n = AllocatedNum::alloc(&mut cs, || Ok(r)).unwrap(); let bits = if i % 2 == 0 { - n.into_bits_le(&mut cs).unwrap() + n.to_bits_le(&mut cs).unwrap() } else { - n.into_bits_le_strict(&mut cs).unwrap() + n.to_bits_le_strict(&mut cs).unwrap() }; assert!(cs.is_satisfied());