Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove From<Conf<Ref<Type>>> for BNTypeWithConfidence #5326

Merged
merged 1 commit into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading