Skip to content

Commit

Permalink
chore: add similar reuse to return witnesses
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Dec 1, 2023
1 parent 68c4cb4 commit 20ea191
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,8 @@ impl AcirContext {
/// Converts the `AcirVar` to a `Witness` if it hasn't been already, and appends it to the
/// `GeneratedAcir`'s return witnesses.
pub(crate) fn return_var(&mut self, acir_var: AcirVar) -> Result<(), InternalError> {
let witness = self.var_to_witness(acir_var)?;
let return_var = self.get_or_create_witness_var(acir_var)?;
let witness = self.var_to_witness(return_var)?;
self.acir_ir.push_return_witness(witness);
Ok(())
}
Expand Down

0 comments on commit 20ea191

Please sign in to comment.