summaryrefslogtreecommitdiff
path: root/rust/src/flowgraph.rs
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-04-30 17:38:40 -0400
committerMason Reed <35282038+emesare@users.noreply.github.com>2025-05-12 17:45:24 -0400
commitc3fdda9727f5507818e3f55576ad32215a22b0f9 (patch)
treed522025055eb7253c7f2cb94732402aacf2afbfc /rust/src/flowgraph.rs
parentc3f344a38ca4b027b4e69b0f82d3184622d6da79 (diff)
[Rust] Remove Architecture trait bound on LLIL related structures
Diffstat (limited to 'rust/src/flowgraph.rs')
-rw-r--r--rust/src/flowgraph.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/rust/src/flowgraph.rs b/rust/src/flowgraph.rs
index c8a9e4a7..976764eb 100644
--- a/rust/src/flowgraph.rs
+++ b/rust/src/flowgraph.rs
@@ -14,7 +14,6 @@
//! Interfaces for creating and displaying pretty CFGs in Binary Ninja.
-use crate::architecture::CoreArchitecture;
use crate::disassembly::DisassemblyTextLine;
use crate::rc::*;
use binaryninjacore_sys::*;
@@ -55,17 +54,11 @@ impl FlowGraph {
unsafe { Array::new(nodes_ptr, count, ()) }
}
- pub fn low_level_il(&self) -> Result<Ref<RegularLowLevelILFunction<CoreArchitecture>>, ()> {
+ pub fn low_level_il(&self) -> Result<Ref<RegularLowLevelILFunction>, ()> {
unsafe {
let llil_ptr = BNGetFlowGraphLowLevelILFunction(self.handle);
match llil_ptr.is_null() {
- false => {
- let func_ptr = BNGetLowLevelILOwnerFunction(llil_ptr);
- let arch_ptr = BNGetFunctionArchitecture(func_ptr);
- let arch = CoreArchitecture::from_raw(arch_ptr);
- BNFreeFunction(func_ptr);
- Ok(RegularLowLevelILFunction::ref_from_raw(arch, llil_ptr))
- }
+ false => Ok(RegularLowLevelILFunction::ref_from_raw(llil_ptr)),
true => Err(()),
}
}