From 8873db8d15e85b0e7c9067ac4a750928904d5e21 Mon Sep 17 00:00:00 2001 From: KyleMiles Date: Wed, 10 May 2023 11:17:31 -0400 Subject: Partially revert my previous commit: Allow extra type bounds, but suppress clippy with comment --- rust/src/custombinaryview.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'rust/src/custombinaryview.rs') 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(_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::), - parse: Some(cb_parse), + parse: Some(cb_parse::), isValidForData: Some(cb_valid::), isDeprecated: Some(cb_deprecated::), getLoadSettingsForData: Some(cb_load_settings::), -- cgit v1.3.1