Skip to content

Commit

Permalink
Remove unnecessary pointer cast.
Browse files Browse the repository at this point in the history
Signed-off-by: Shachar Langbeheim <[email protected]>
  • Loading branch information
nihohit committed Dec 30, 2024
1 parent 5a719b3 commit d5e76f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion csharp/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Client> {
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()
Expand Down

0 comments on commit d5e76f8

Please sign in to comment.