diff options
| author | KyleMiles <krm504@nyu.edu> | 2022-08-29 12:25:14 -0400 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2022-08-29 12:49:20 -0400 |
| commit | 3d1aaeb4d5e72ba6adcaa9eb24429879f5ad3250 (patch) | |
| tree | 6a81aed92dbc49aa14a370b962f15c0a34c967dd /rust/examples/flowgraph/src | |
| parent | 69f7caca76cf05cfd5d3e48c6cd950aed20d7f97 (diff) | |
Rust API Examples : Fix uses of `InstructionTextToken::new`
Diffstat (limited to 'rust/examples/flowgraph/src')
| -rw-r--r-- | rust/examples/flowgraph/src/lib.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/rust/examples/flowgraph/src/lib.rs b/rust/examples/flowgraph/src/lib.rs index ac586922..f80879e5 100644 --- a/rust/examples/flowgraph/src/lib.rs +++ b/rust/examples/flowgraph/src/lib.rs @@ -1,17 +1,18 @@ use binaryninja::{ binaryview::{BinaryView, BinaryViewExt}, command::register, - disassembly::{DisassemblyTextLine, InstructionTextToken, InstructionTextTokenType}, + disassembly::{DisassemblyTextLine, InstructionTextToken, InstructionTextTokenContents}, flowgraph::{BranchType, EdgePenStyle, EdgeStyle, FlowGraph, FlowGraphNode, ThemeColor}, + string::BnString, }; fn test_graph(view: &BinaryView) { let graph = FlowGraph::new(); let disassembly_lines_a = vec![DisassemblyTextLine::from(vec![ - InstructionTextToken::new(InstructionTextTokenType::TextToken, "Li", 0), - InstructionTextToken::new(InstructionTextTokenType::TextToken, "ne", 0), - InstructionTextToken::new(InstructionTextTokenType::TextToken, " 1", 0), + InstructionTextToken::new(BnString::new("Li"), InstructionTextTokenContents::Text), + InstructionTextToken::new(BnString::new("ne"), InstructionTextTokenContents::Text), + InstructionTextToken::new(BnString::new(" 1"), InstructionTextTokenContents::Text), ])]; let node_a = FlowGraphNode::new(&graph); |
