diff options
| author | Mason Reed <mason@vector35.com> | 2025-04-30 17:38:40 -0400 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2025-05-12 17:45:24 -0400 |
| commit | c3fdda9727f5507818e3f55576ad32215a22b0f9 (patch) | |
| tree | d522025055eb7253c7f2cb94732402aacf2afbfc /rust/src/function.rs | |
| parent | c3f344a38ca4b027b4e69b0f82d3184622d6da79 (diff) | |
[Rust] Remove Architecture trait bound on LLIL related structures
Diffstat (limited to 'rust/src/function.rs')
| -rw-r--r-- | rust/src/function.rs | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/rust/src/function.rs b/rust/src/function.rs index 7990f109..c882ab08 100644 --- a/rust/src/function.rs +++ b/rust/src/function.rs @@ -529,45 +529,38 @@ impl Function { } } - pub fn low_level_il(&self) -> Result<Ref<RegularLowLevelILFunction<CoreArchitecture>>, ()> { + pub fn low_level_il(&self) -> Result<Ref<RegularLowLevelILFunction>, ()> { unsafe { let llil_ptr = BNGetFunctionLowLevelIL(self.handle); match llil_ptr.is_null() { - false => Ok(RegularLowLevelILFunction::ref_from_raw( - self.arch(), - llil_ptr, - )), + false => Ok(RegularLowLevelILFunction::ref_from_raw(llil_ptr)), true => Err(()), } } } - pub fn low_level_il_if_available( - &self, - ) -> Option<Ref<RegularLowLevelILFunction<CoreArchitecture>>> { + pub fn low_level_il_if_available(&self) -> Option<Ref<RegularLowLevelILFunction>> { let llil_ptr = unsafe { BNGetFunctionLowLevelILIfAvailable(self.handle) }; match llil_ptr.is_null() { - false => { - Some(unsafe { RegularLowLevelILFunction::ref_from_raw(self.arch(), llil_ptr) }) - } + false => Some(unsafe { RegularLowLevelILFunction::ref_from_raw(llil_ptr) }), true => None, } } - pub fn lifted_il(&self) -> Result<Ref<LiftedILFunction<CoreArchitecture>>, ()> { + pub fn lifted_il(&self) -> Result<Ref<LiftedILFunction>, ()> { unsafe { let llil_ptr = BNGetFunctionLiftedIL(self.handle); match llil_ptr.is_null() { - false => Ok(LiftedILFunction::ref_from_raw(self.arch(), llil_ptr)), + false => Ok(LiftedILFunction::ref_from_raw(llil_ptr)), true => Err(()), } } } - pub fn lifted_il_if_available(&self) -> Option<Ref<LiftedILFunction<CoreArchitecture>>> { + pub fn lifted_il_if_available(&self) -> Option<Ref<LiftedILFunction>> { let llil_ptr = unsafe { BNGetFunctionLiftedILIfAvailable(self.handle) }; match llil_ptr.is_null() { - false => Some(unsafe { LiftedILFunction::ref_from_raw(self.arch(), llil_ptr) }), + false => Some(unsafe { LiftedILFunction::ref_from_raw(llil_ptr) }), true => None, } } |
