Skip to content

Commit

Permalink
Remove From Conf<Ref<Type>> impl for BNTypeWithConfidence
Browse files Browse the repository at this point in the history
  • Loading branch information
rbran committed Apr 25, 2024
1 parent 98a5094 commit 79d8d14
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
4 changes: 2 additions & 2 deletions rust/src/architecture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions rust/src/binaryview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

Expand Down
9 changes: 0 additions & 9 deletions rust/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 79d8d14

Please sign in to comment.