From a8530c9012bd5018706e1ec69623e5234bc6aa7c Mon Sep 17 00:00:00 2001 From: collin Date: Mon, 17 Aug 2020 23:13:54 -0700 Subject: [PATCH] comment out field gadget eq --- compiler/src/value/field/field_type.rs | 2 +- .../src/value/group/targets/edwards_bls12.rs | 48 +++++++++---------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/compiler/src/value/field/field_type.rs b/compiler/src/value/field/field_type.rs index 1e06baa65b..88f0283d0d 100644 --- a/compiler/src/value/field/field_type.rs +++ b/compiler/src/value/field/field_type.rs @@ -209,7 +209,7 @@ impl PartialOrd for FieldType { } impl EvaluateEqGadget for FieldType { - fn evaluate_equal>(&self, mut cs: CS, other: &Self) -> Result { + fn evaluate_equal>(&self, mut _cs: CS, other: &Self) -> Result { match (self, other) { (FieldType::Constant(first), FieldType::Constant(second)) => Ok(Boolean::constant(first.eq(second))), _ => unimplemented!(), diff --git a/compiler/src/value/group/targets/edwards_bls12.rs b/compiler/src/value/group/targets/edwards_bls12.rs index 7f5d713d29..d45e1390c7 100644 --- a/compiler/src/value/group/targets/edwards_bls12.rs +++ b/compiler/src/value/group/targets/edwards_bls12.rs @@ -236,32 +236,32 @@ impl PartialEq for EdwardsGroupType { impl Eq for EdwardsGroupType {} -fn compare_allocated_edwards_bls_gadgets>( - mut cs: CS, - first: &EdwardsBlsGadget, - second: &EdwardsBlsGadget, -) -> Result { - // compare x coordinates - let x_first = &first.x; - let x_second = &second.x; - - let compare_x = x_first.evaluate_equal(&mut cs.ns(|| format!("compare x")), x_second)?; - - // compare y coordinates - let y_first = &first.y; - let y_second = &second.y; - - let compare_y = y_first.evaluate_equal(&mut cs.ns(|| format!("compare y")), y_second)?; - - Boolean::and( - &mut cs.ns(|| format!("compare x and y results")), - &compare_x, - &compare_y, - ) -} +// fn compare_allocated_edwards_bls_gadgets>( +// mut cs: CS, +// first: &EdwardsBlsGadget, +// second: &EdwardsBlsGadget, +// ) -> Result { +// // compare x coordinates +// let x_first = &first.x; +// let x_second = &second.x; +// +// let compare_x = x_first.evaluate_equal(&mut cs.ns(|| format!("compare x")), x_second)?; +// +// // compare y coordinates +// let y_first = &first.y; +// let y_second = &second.y; +// +// let compare_y = y_first.evaluate_equal(&mut cs.ns(|| format!("compare y")), y_second)?; +// +// Boolean::and( +// &mut cs.ns(|| format!("compare x and y results")), +// &compare_x, +// &compare_y, +// ) +// } impl EvaluateEqGadget for EdwardsGroupType { - fn evaluate_equal>(&self, mut cs: CS, other: &Self) -> Result { + fn evaluate_equal>(&self, mut _cs: CS, other: &Self) -> Result { match (self, other) { (EdwardsGroupType::Constant(self_value), EdwardsGroupType::Constant(other_value)) => { Ok(Boolean::constant(self_value.eq(other_value)))