diff --git a/src/gadgets/insert.rs b/src/gadgets/insert.rs index 4b6a15b1..c14dcf8d 100644 --- a/src/gadgets/insert.rs +++ b/src/gadgets/insert.rs @@ -21,7 +21,8 @@ impl, const D: usize> CircuitBuilder { /// Evaluates to 1 if `x` and `y` are equal, 0 otherwise. pub fn is_equal(&mut self, x: Target, y: Target) -> Target { - self.is_zero(self.sub(x, y)) + let difference = self.sub(x, y); + self.is_zero(difference) } /// Inserts a `Target` in a vector at a non-deterministic index. This is done by rotating to the