From d21c061fe1188e1db0010157635d4937c28296c3 Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 10 Dec 2024 21:18:58 +0000 Subject: [PATCH] Move "from_var" fn. --- executor/src/witgen/jit/symbolic_expression.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/executor/src/witgen/jit/symbolic_expression.rs b/executor/src/witgen/jit/symbolic_expression.rs index 780f54793c..55a44fecf3 100644 --- a/executor/src/witgen/jit/symbolic_expression.rs +++ b/executor/src/witgen/jit/symbolic_expression.rs @@ -44,6 +44,10 @@ pub enum UnaryOperator { } impl SymbolicExpression { + pub fn from_var(name: V) -> Self { + SymbolicExpression::Variable(name, None) + } + pub fn is_known_zero(&self) -> bool { self.try_to_number().map_or(false, |n| n.is_zero()) } @@ -116,12 +120,6 @@ impl Display for UnaryOperator { } } -impl SymbolicExpression { - pub fn from_var(name: V) -> Self { - SymbolicExpression::Variable(name, None) - } -} - impl From for SymbolicExpression { fn from(n: T) -> Self { SymbolicExpression::Concrete(n)