From d5e76f8695dc20e78466956cc9f3f3c119aedb5a Mon Sep 17 00:00:00 2001 From: Shachar Langbeheim Date: Mon, 30 Dec 2024 22:26:34 +0200 Subject: [PATCH] Remove unnecessary pointer cast. Signed-off-by: Shachar Langbeheim --- csharp/lib/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csharp/lib/src/lib.rs b/csharp/lib/src/lib.rs index c497410e31..88da043f03 100644 --- a/csharp/lib/src/lib.rs +++ b/csharp/lib/src/lib.rs @@ -51,7 +51,7 @@ fn create_client_internal( success_callback: unsafe extern "C" fn(usize, *const c_char) -> (), failure_callback: unsafe extern "C" fn(usize) -> (), ) -> RedisResult { - let host_cstring = unsafe { CStr::from_ptr(host as *mut c_char) }; + let host_cstring = unsafe { CStr::from_ptr(host) }; let host_string = host_cstring.to_str()?.to_string(); let request = create_connection_request(host_string, port, use_tls); let runtime = Builder::new_multi_thread()