summaryrefslogtreecommitdiff
path: root/rust/src/custombinaryview.rs
diff options
context:
space:
mode:
authorKyleMiles <krm504@nyu.edu>2023-05-10 11:17:31 -0400
committerKyleMiles <krm504@nyu.edu>2023-05-10 11:22:15 -0400
commit8873db8d15e85b0e7c9067ac4a750928904d5e21 (patch)
tree30c005cc1c11cf8fdf9535c23c6bb7d025703847 /rust/src/custombinaryview.rs
parent590ff3e4e90a01738929163cc0abf9535b839f2b (diff)
Partially revert my previous commit: Allow extra type bounds, but suppress clippy with comment
Diffstat (limited to 'rust/src/custombinaryview.rs')
-rw-r--r--rust/src/custombinaryview.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/rust/src/custombinaryview.rs b/rust/src/custombinaryview.rs
index aa4eef27..740d0f40 100644
--- a/rust/src/custombinaryview.rs
+++ b/rust/src/custombinaryview.rs
@@ -93,7 +93,11 @@ where
})
}
- extern "C" fn cb_parse(_ctxt: *mut c_void, _data: *mut BNBinaryView) -> *mut BNBinaryView {
+ #[allow(clippy::extra_unused_type_parameters)] // TODO : This is bad; need to finish this stub
+ extern "C" fn cb_parse<T>(_ctxt: *mut c_void, _data: *mut BNBinaryView) -> *mut BNBinaryView
+ where
+ T: CustomBinaryViewType,
+ {
ffi_wrap!("BinaryViewTypeBase::parse", ptr::null_mut())
}
@@ -124,7 +128,7 @@ where
let mut bn_obj = BNCustomBinaryViewType {
context: ctxt as *mut _,
create: Some(cb_create::<T>),
- parse: Some(cb_parse),
+ parse: Some(cb_parse::<T>),
isValidForData: Some(cb_valid::<T>),
isDeprecated: Some(cb_deprecated::<T>),
getLoadSettingsForData: Some(cb_load_settings::<T>),