Skip to content

Commit

Permalink
chore: simplify AcirVarData where possible in multiplication (noir-…
Browse files Browse the repository at this point in the history
…lang#3124)

Co-authored-by: Tom French <git@tomfren.ch>
  • Loading branch information
2 people authored and Sakapoi committed Oct 19, 2023
1 parent 4c2aaf0 commit 4874832
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 4874832

Please sign in to comment.