diff options
Diffstat (limited to 'rust/src')
| -rw-r--r-- | rust/src/binaryview.rs | 1 | ||||
| -rw-r--r-- | rust/src/lib.rs | 4 | ||||
| -rw-r--r-- | rust/src/references.rs | 6 |
3 files changed, 6 insertions, 5 deletions
diff --git a/rust/src/binaryview.rs b/rust/src/binaryview.rs index 3f50c001..fbbe4a58 100644 --- a/rust/src/binaryview.rs +++ b/rust/src/binaryview.rs @@ -476,6 +476,7 @@ pub trait BinaryViewExt: BinaryViewBase { } } + /// You likely would also like to call [`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()); diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 94e6ea40..9cbe32e9 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -235,9 +235,9 @@ pub fn open_view<F: AsRef<Path>>(filename: F) -> Result<rc::Ref<binaryview::Bina if available_view.name().as_str() == "Raw" { None } else if is_bndb { - match view.file().get_view_of_type(available_view.name()){ + match view.file().get_view_of_type(available_view.name()) { Ok(view) => Some(view), - _ => None + _ => None, } } else { // TODO : add log prints diff --git a/rust/src/references.rs b/rust/src/references.rs index e3a73013..5e878a7d 100644 --- a/rust/src/references.rs +++ b/rust/src/references.rs @@ -25,9 +25,9 @@ pub struct DataReference { impl CodeReference { pub(crate) unsafe fn new(handle: &BNReferenceSource) -> Self { - let func = ManuallyDrop::new(Function::from_raw((*handle).func)); - let arch = CoreArchitecture::from_raw((*handle).arch); - let address = (*handle).addr; + let func = ManuallyDrop::new(Function::from_raw(handle.func)); + let arch = CoreArchitecture::from_raw(handle.arch); + let address = handle.addr; Self { func, arch, |
