diff options
| author | Michael Krasnitski <michael.krasnitski@gmail.com> | 2024-04-16 19:32:04 -0400 |
|---|---|---|
| committer | Kyle Martin <krm504@nyu.edu> | 2024-05-09 13:11:41 -0400 |
| commit | 29b62677dad48aa4d55ad2dae5d176d9880216bd (patch) | |
| tree | f205a5f4ebb7e71ea132fe06a7076c70616d3c62 /rust/src/binaryview.rs | |
| parent | 608f261e6bca5869e748d4509da92a5717dce75d (diff) | |
Fix clippy warnings and run rustfmt
Diffstat (limited to 'rust/src/binaryview.rs')
| -rw-r--r-- | rust/src/binaryview.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/rust/src/binaryview.rs b/rust/src/binaryview.rs index 6e510694..70b1cab0 100644 --- a/rust/src/binaryview.rs +++ b/rust/src/binaryview.rs @@ -1584,11 +1584,9 @@ where ctx: *mut ::std::os::raw::c_void, view: *mut BNBinaryView, ) { - ffi_wrap!("EventHandler::on_event", unsafe { - let mut context = &mut *(ctx as *mut Handler); - - let handle = BinaryView::from_raw(BNNewViewReference(view)); - Handler::on_event(&mut context, handle.as_ref()); + ffi_wrap!("EventHandler::on_event", { + let context = unsafe { &*(ctx as *const Handler) }; + context.on_event(&BinaryView::from_raw(BNNewViewReference(view))); }) } |
