From 3fe581e9c89ddb357c79535bed379d2558667af4 Mon Sep 17 00:00:00 2001 From: Rubens Brandao Date: Thu, 25 Apr 2024 12:32:01 -0300 Subject: [PATCH] Remove From Conf> impl for BNTypeWithConfidence --- rust/src/architecture.rs | 2 +- rust/src/binaryview.rs | 4 ++-- rust/src/types.rs | 9 --------- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/rust/src/architecture.rs b/rust/src/architecture.rs index 9a7b3e7237..1b443e2ae5 100644 --- a/rust/src/architecture.rs +++ b/rust/src/architecture.rs @@ -2475,7 +2475,7 @@ where let inputs = intrinsic.outputs(); let mut res = Vec::with_capacity(inputs.len()); for input in inputs { - res.push(input.into()); + res.push(input.as_ref().into()); } unsafe { diff --git a/rust/src/binaryview.rs b/rust/src/binaryview.rs index 52d688b843..2664d24718 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 8f14cf00e0..df206b34bd 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 {