Skip to content

Commit

Permalink
chore: simplify AcirVarData where possible in multiplication (#3124)
Browse files Browse the repository at this point in the history
Co-authored-by: Tom French <git@tomfren.ch>
  • Loading branch information
TomAFrench and TomAFrench authored Oct 12, 2023
1 parent 39dbcf1 commit 8e3fb4a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -487,11 +487,11 @@ impl AcirContext {
| (AcirVarData::Const(constant), AcirVarData::Witness(witness)) => {
let mut expr = Expression::default();
expr.push_addition_term(constant, witness);
self.add_data(AcirVarData::Expr(expr))
self.add_data(AcirVarData::from(expr))
}
(AcirVarData::Const(constant), AcirVarData::Expr(expr))
| (AcirVarData::Expr(expr), AcirVarData::Const(constant)) => {
self.add_data(AcirVarData::Expr(&expr * constant))
self.add_data(AcirVarData::from(&expr * constant))
}
(AcirVarData::Witness(lhs_witness), AcirVarData::Witness(rhs_witness)) => {
let mut expr = Expression::default();
Expand Down

0 comments on commit 8e3fb4a

Please sign in to comment.