From 462276a4aa998e0b0ef804dd8d3b2eaa84a82f98 Mon Sep 17 00:00:00 2001 From: Michael Krasnitski Date: Tue, 27 Feb 2024 14:26:56 -0500 Subject: Move `ILFunction` trait into `operand_iter.rs` to make it private --- rust/src/hlil/function.rs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'rust/src/hlil/function.rs') diff --git a/rust/src/hlil/function.rs b/rust/src/hlil/function.rs index 7ab9e519..4bad7f0f 100644 --- a/rust/src/hlil/function.rs +++ b/rust/src/hlil/function.rs @@ -2,16 +2,14 @@ use std::hash::{Hash, Hasher}; use binaryninjacore_sys::BNFreeHighLevelILFunction; use binaryninjacore_sys::BNGetHighLevelILBasicBlockList; -use binaryninjacore_sys::BNGetHighLevelILByIndex; use binaryninjacore_sys::BNGetHighLevelILInstructionCount; use binaryninjacore_sys::BNGetHighLevelILOwnerFunction; use binaryninjacore_sys::BNGetHighLevelILSSAForm; use binaryninjacore_sys::BNHighLevelILFunction; -use binaryninjacore_sys::BNHighLevelILOperation; use binaryninjacore_sys::BNNewHighLevelILFunctionReference; use crate::basicblock::BasicBlock; -use crate::function::{Function, ILFunction}; +use crate::function::Function; use crate::rc::{Array, Ref, RefCountable}; use super::{HighLevelILBlock, HighLevelILInstruction, HighLevelILLiftedInstruction}; @@ -85,20 +83,6 @@ impl HighLevelILFunction { } } -impl ILFunction for HighLevelILFunction { - type Instruction = HighLevelILInstruction; - - fn il_instruction_from_idx(&self, expr_idx: usize) -> Self::Instruction { - self.instruction_from_idx(expr_idx) - } - - fn operands_from_idx(&self, expr_idx: usize) -> [u64; 5] { - let node = unsafe { BNGetHighLevelILByIndex(self.handle, expr_idx, self.full_ast) }; - assert_eq!(node.operation, BNHighLevelILOperation::HLIL_UNDEF); - node.operands - } -} - impl ToOwned for HighLevelILFunction { type Owned = Ref; -- cgit v1.3.1