From 581e2de8c4bf2d3fe881711a87a1fc99f3ab9375 Mon Sep 17 00:00:00 2001 From: aaron-congo Date: Fri, 19 Apr 2024 11:32:44 -0700 Subject: [PATCH] Attempt to fix lint-rust --- go/src/lib.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/go/src/lib.rs b/go/src/lib.rs index 69d75e6af2..74be952135 100644 --- a/go/src/lib.rs +++ b/go/src/lib.rs @@ -1,9 +1,7 @@ /** * Copyright GLIDE-for-Redis Project Contributors - SPDX Identifier: Apache-2.0 */ -// TODO: uncomment -// #![deny(unsafe_op_in_unsafe_fn)] - +#![deny(unsafe_op_in_unsafe_fn)] use glide_core::client::Client as GlideClient; use glide_core::connection_request; use glide_core::errors; @@ -368,7 +366,7 @@ pub unsafe extern "C" fn command( arg_count: usize, args: *const *const c_char, ) { -let client = unsafe { Box::leak(Box::from_raw(client_ptr as *mut Client)) }; + let client = unsafe { Box::leak(Box::from_raw(client_ptr as *mut Client)) }; // The safety of this needs to be ensured by the calling code. Cannot dispose of the pointer before all operations have completed. let ptr_address = client_ptr as usize;