Skip to content

Commit

Permalink
passing in reference to assert_boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
svv232 committed Dec 23, 2024
1 parent 758fb1e commit 037f60a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions o1vm/src/interpreters/riscv32im/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,9 @@ pub trait InterpreterEnv {
fn check_boolean(x: &Self::Variable);

/// Assert that the value `x` is boolean, and add a constraint in the proof system.
fn assert_boolean(&mut self, x: Self::Variable) {
Self::check_boolean(&x);
self.add_constraint(x.clone() * x.clone() - x);
fn assert_boolean(&mut self, x: &Self::Variable) {
Self::check_boolean(x);
self.add_constraint(x.clone() * x.clone() - x.clone());
}

fn add_lookup(&mut self, lookup: Lookup<Self::Variable>);
Expand Down

0 comments on commit 037f60a

Please sign in to comment.