From 2289c3d603f4f1d2ffe3c9d5a6c81cc93f2453f1 Mon Sep 17 00:00:00 2001 From: Ana Perez Ghiglia Date: Tue, 4 Jun 2024 16:17:22 -0600 Subject: [PATCH] fix cargo clippy run --- tooling/debugger/src/repl.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tooling/debugger/src/repl.rs b/tooling/debugger/src/repl.rs index ea9a7aa089e..ae7e1de9669 100644 --- a/tooling/debugger/src/repl.rs +++ b/tooling/debugger/src/repl.rs @@ -200,21 +200,19 @@ impl<'a, B: BlackBoxFunctionSolver> ReplDebugger<'a, B> { } fn add_breakpoint_at_line(&mut self, line_number: i64) { - let current_file = match self.context.get_current_file() { - Some(file) => file.clone(), - None => { - println!("No current file."); - return; - } + let Some(current_file) = self.context.get_current_file() else { + println!("No current file."); + return; }; - let best_location = self.context.find_opcode_for_source_location(¤t_file, line_number); + let best_location = + self.context.find_opcode_for_source_location(¤t_file, line_number); match best_location { Some(location) => { println!("Added breakpoint at line {}", line_number); self.add_breakpoint_at(location) - }, + } None => println!("No opcode at line {}", line_number), } }