From 79d8d14eb32a9b1766eb546d3791580dfee7278f Mon Sep 17 00:00:00 2001 From: Rubens Brandao Date: Thu, 25 Apr 2024 12:32:01 -0300 Subject: Remove From Conf> impl for BNTypeWithConfidence --- rust/src/architecture.rs | 4 ++-- rust/src/binaryview.rs | 4 ++-- rust/src/types.rs | 9 --------- 3 files changed, 4 insertions(+), 13 deletions(-) (limited to 'rust/src') diff --git a/rust/src/architecture.rs b/rust/src/architecture.rs index 9a7b3e72..b237ac6a 100644 --- a/rust/src/architecture.rs +++ b/rust/src/architecture.rs @@ -2474,8 +2474,8 @@ where if let Some(intrinsic) = custom_arch.intrinsic_from_id(intrinsic) { let inputs = intrinsic.outputs(); let mut res = Vec::with_capacity(inputs.len()); - for input in inputs { - res.push(input.into()); + for input in inputs.iter() { + res.push(input.as_ref().into()); } unsafe { diff --git a/rust/src/binaryview.rs b/rust/src/binaryview.rs index 52d688b8..2664d247 100644 --- a/rust/src/binaryview.rs +++ b/rust/src/binaryview.rs @@ -576,14 +576,14 @@ pub trait BinaryViewExt: BinaryViewBase { fn define_auto_data_var(&self, dv: DataVariable) { unsafe { - BNDefineDataVariable(self.as_ref().handle, dv.address, &mut dv.t.into()); + BNDefineDataVariable(self.as_ref().handle, dv.address, &mut dv.t.as_ref().into()); } } /// You likely would also like to call [`Self::define_user_symbol`] to bind this data variable with a name fn define_user_data_var(&self, dv: DataVariable) { unsafe { - BNDefineUserDataVariable(self.as_ref().handle, dv.address, &mut dv.t.into()); + BNDefineUserDataVariable(self.as_ref().handle, dv.address, &mut dv.t.as_ref().into()); } } diff --git a/rust/src/types.rs b/rust/src/types.rs index 8f14cf00..df206b34 100644 --- a/rust/src/types.rs +++ b/rust/src/types.rs @@ -260,15 +260,6 @@ impl From for Conf { } } -impl From>> for BNTypeWithConfidence { - fn from(conf: Conf>) -> Self { - Self { - type_: conf.contents.handle, - confidence: conf.confidence, - } - } -} - impl From> for BNTypeWithConfidence { fn from(conf: Conf<&Type>) -> Self { Self { -- cgit v1.3.1