From 4f93e401d8ac0dc6d30e1ccfe76cb59ea94208ce Mon Sep 17 00:00:00 2001 From: Martin Verzilli Date: Fri, 13 Oct 2023 18:43:19 +0200 Subject: [PATCH] chore(debugger): avoid taking ownership of Circuit when building debug context (#3147) Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> --- tooling/debugger/src/lib.rs | 4 ++-- tooling/nargo_cli/src/cli/debug_cmd.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tooling/debugger/src/lib.rs b/tooling/debugger/src/lib.rs index ed9fe08ca97..6fde85e35f1 100644 --- a/tooling/debugger/src/lib.rs +++ b/tooling/debugger/src/lib.rs @@ -21,7 +21,7 @@ struct DebugContext<'backend, B: BlackBoxFunctionSolver> { acvm: Option>, debug_artifact: DebugArtifact, foreign_call_executor: ForeignCallExecutor, - circuit: Circuit, + circuit: &'backend Circuit, show_output: bool, } @@ -115,7 +115,7 @@ fn map_command_status(result: SolveResult) -> CommandStatus { pub fn debug_circuit( blackbox_solver: &B, - circuit: Circuit, + circuit: &Circuit, debug_artifact: DebugArtifact, initial_witness: WitnessMap, show_output: bool, diff --git a/tooling/nargo_cli/src/cli/debug_cmd.rs b/tooling/nargo_cli/src/cli/debug_cmd.rs index 5dcb2c7bdec..7d8c0dc9a15 100644 --- a/tooling/nargo_cli/src/cli/debug_cmd.rs +++ b/tooling/nargo_cli/src/cli/debug_cmd.rs @@ -120,7 +120,7 @@ pub(crate) fn debug_program( noir_debugger::debug_circuit( &blackbox_solver, - compiled_program.circuit.clone(), + &compiled_program.circuit, debug_artifact, initial_witness, true,