diff options
Diffstat (limited to 'rust/examples')
| -rw-r--r-- | rust/examples/flowgraph.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/rust/examples/flowgraph.rs b/rust/examples/flowgraph.rs index 515d52fe..ce91d62f 100644 --- a/rust/examples/flowgraph.rs +++ b/rust/examples/flowgraph.rs @@ -15,7 +15,7 @@ use binaryninja::{ pub struct GraphPrinter; impl GraphPrinter { - pub fn print_graph(&self, _view: &BinaryView, graph: &FlowGraph) { + pub fn print_graph(&self, graph: &FlowGraph) { println!("Printing flow graph:"); for node in &graph.nodes() { // Print all disassembly lines in the node @@ -60,16 +60,16 @@ impl InteractionHandler for GraphPrinter { false } - fn show_plain_text_report(&mut self, _view: &BinaryView, title: &str, contents: &str) { + fn show_plain_text_report(&mut self, _view: Option<&BinaryView>, title: &str, contents: &str) { println!("Plain text report"); println!("Title: {}", title); println!("Contents: {}", contents); } - fn show_graph_report(&mut self, view: &BinaryView, title: &str, graph: &FlowGraph) { + fn show_graph_report(&mut self, _view: Option<&BinaryView>, title: &str, graph: &FlowGraph) { println!("Graph report"); println!("Title: {}", title); - self.print_graph(view, graph); + self.print_graph(graph); } fn get_form_input(&mut self, _form: &mut Form) -> bool { @@ -77,7 +77,7 @@ impl InteractionHandler for GraphPrinter { } } -fn test_graph(view: &BinaryView) { +fn test_graph() { let graph = FlowGraph::new(); let disassembly_lines_a = vec