diff --git a/tooling/debugger/src/context.rs b/tooling/debugger/src/context.rs index e913cd02a70..be660fd6f13 100644 --- a/tooling/debugger/src/context.rs +++ b/tooling/debugger/src/context.rs @@ -170,7 +170,7 @@ impl<'a, B: BlackBoxFunctionSolver> DebugContext<'a, B> { return result; } let new_location = self.get_current_source_location(); - if matches!(new_location, Some(..)) && new_location != start_location { + if new_location.is_some() && new_location != start_location { return DebugCommandResult::Ok; } } @@ -201,10 +201,11 @@ impl<'a, B: BlackBoxFunctionSolver> DebugContext<'a, B> { acir_index < opcodes.len() && matches!(opcodes[acir_index], Opcode::Brillig(..)) && { - let Opcode::Brillig(ref brillig) = opcodes[acir_index] else { - unreachable!("opcode at {acir_index} is not Brillig") - }; - brillig_index < brillig.bytecode.len() + if let Some(Opcode::Brillig(ref brillig)) = opcodes[acir_index] { + brillig_index < brillig.bytecode.len() + } else { + false + } } } } diff --git a/tooling/debugger/src/repl.rs b/tooling/debugger/src/repl.rs index 2d053d82153..19872cb4938 100644 --- a/tooling/debugger/src/repl.rs +++ b/tooling/debugger/src/repl.rs @@ -264,7 +264,7 @@ impl<'a, B: BlackBoxFunctionSolver> ReplDebugger<'a, B> { fn restart_session(&mut self) { let breakpoints: Vec = - self.context.iterate_breakpoints().cloned().collect(); + self.context.iterate_breakpoints().copied().collect(); self.context = DebugContext::new( self.blackbox_solver, self.circuit,