Skip to content

Commit

Permalink
Move "from_var" fn.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth committed Dec 10, 2024
1 parent 5014950 commit d21c061
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions executor/src/witgen/jit/symbolic_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ pub enum UnaryOperator {
}

impl<T: FieldElement, V> SymbolicExpression<T, V> {
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())
}
Expand Down Expand Up @@ -116,12 +120,6 @@ impl Display for UnaryOperator {
}
}

impl<T: FieldElement, V> SymbolicExpression<T, V> {
pub fn from_var(name: V) -> Self {
SymbolicExpression::Variable(name, None)
}
}

impl<T: FieldElement, V> From<T> for SymbolicExpression<T, V> {
fn from(n: T) -> Self {
SymbolicExpression::Concrete(n)
Expand Down

0 comments on commit d21c061

Please sign in to comment.