diff options
| author | KyleMiles <krm504@nyu.edu> | 2023-01-05 17:29:14 -0500 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2023-01-06 16:29:58 -0500 |
| commit | a154e45cce79b0c2264c1e1cd37a3d1bf5bc6154 (patch) | |
| tree | 11f436b720edfdf37819e9e83e7131d220687074 /rust/src/custombinaryview.rs | |
| parent | 52edc39a7081fd6662e14fbcd473adabbbc36c7a (diff) | |
Rust API: Lots and lots of clippy changes
Diffstat (limited to 'rust/src/custombinaryview.rs')
| -rw-r--r-- | rust/src/custombinaryview.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/src/custombinaryview.rs b/rust/src/custombinaryview.rs index a50e956f..aa4e9e2f 100644 --- a/rust/src/custombinaryview.rs +++ b/rust/src/custombinaryview.rs @@ -76,7 +76,7 @@ where let data = BinaryView::from_raw(BNNewViewReference(data)); let builder = CustomViewBuilder { - view_type: view_type, + view_type, actual_parent: &data, }; @@ -254,7 +254,7 @@ impl BinaryViewTypeBase for BinaryViewType { fn load_settings_for_data(&self, data: &BinaryView) -> Result<Ref<Settings>> { let settings_handle = - unsafe { BNGetBinaryViewDefaultLoadSettingsForData(self.as_ref().0, data.handle) }; + unsafe { BNGetBinaryViewDefaultLoadSettingsForData(self.0, data.handle) }; if settings_handle.is_null() { Err(()) @@ -441,10 +441,10 @@ impl<'a, T: CustomBinaryViewType> CustomViewBuilder<'a, T> { if context.initialized { mem::forget(context.args); // already consumed - mem::drop(context.view); // cb_init was called + // mem::drop(context.view); // cb_init was called } else { mem::drop(context.args); // never consumed - mem::forget(context.view); // cb_init was not called, is uninit + // mem::forget(context.view); // cb_init was not called, is uninit if context.raw_handle.is_null() { // being called here is essentially a guarantee that BNCreateBinaryViewOfType |
