diff options
| author | Rubens Brandao <git@rubens.io> | 2024-04-25 12:32:01 -0300 |
|---|---|---|
| committer | Rubens Brandao <git@rubens.io> | 2024-04-25 12:36:14 -0300 |
| commit | 79d8d14eb32a9b1766eb546d3791580dfee7278f (patch) | |
| tree | c41e6fd793cbd843f554462857b8b1438cecb984 /rust/src | |
| parent | 98a5094bea61e02fb9184707b8bad6e09b9f5574 (diff) | |
Remove From Conf<Ref<Type>> impl for BNTypeWithConfidence
Diffstat (limited to 'rust/src')
| -rw-r--r-- | rust/src/architecture.rs | 4 | ||||
| -rw-r--r-- | rust/src/binaryview.rs | 4 | ||||
| -rw-r--r-- | rust/src/types.rs | 9 |
3 files changed, 4 insertions, 13 deletions
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<BNOffsetWithConfidence> for Conf<i64> { } } -impl From<Conf<Ref<Type>>> for BNTypeWithConfidence { - fn from(conf: Conf<Ref<Type>>) -> Self { - Self { - type_: conf.contents.handle, - confidence: conf.confidence, - } - } -} - impl From<Conf<&Type>> for BNTypeWithConfidence { fn from(conf: Conf<&Type>) -> Self { Self { |
