Skip to content

Commit

Permalink
fix cargo clippy run
Browse files Browse the repository at this point in the history
  • Loading branch information
anaPerezGhiglia committed Jun 4, 2024
1 parent 765a7a8 commit 2289c3d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tooling/debugger/src/repl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,21 +200,19 @@ impl<'a, B: BlackBoxFunctionSolver<FieldElement>> 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(&current_file, line_number);
let best_location =
self.context.find_opcode_for_source_location(&current_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),
}
}
Expand Down

0 comments on commit 2289c3d

Please sign in to comment.