Skip to content

Commit 98571a4

Browse files
Removed unnecessary pointer casts.
1 parent 0380f4d commit 98571a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/os/unix/shared_lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub type NSTDUnixOptionalSharedLib = NSTDOptional<NSTDUnixSharedLib>;
3838
pub unsafe extern "C" fn nstd_os_unix_shared_lib_load(
3939
path: *const NSTDChar,
4040
) -> NSTDUnixOptionalSharedLib {
41-
let handle = dlopen(path.cast(), RTLD_LAZY | RTLD_LOCAL);
41+
let handle = dlopen(path, RTLD_LAZY | RTLD_LOCAL);
4242
if handle.is_null() {
4343
return NSTDOptional::None;
4444
}
@@ -66,7 +66,7 @@ pub unsafe extern "C" fn nstd_os_unix_shared_lib_get(
6666
lib: &NSTDUnixSharedLib,
6767
symbol: *const NSTDChar,
6868
) -> NSTDAny {
69-
dlsym(lib.handle, symbol.cast())
69+
dlsym(lib.handle, symbol)
7070
}
7171

7272
/// Returns a mutable opaque pointer to a symbol in a loaded library.
@@ -90,7 +90,7 @@ pub unsafe extern "C" fn nstd_os_unix_shared_lib_get_mut(
9090
lib: &mut NSTDUnixSharedLib,
9191
symbol: *const NSTDChar,
9292
) -> NSTDAnyMut {
93-
dlsym(lib.handle, symbol.cast())
93+
dlsym(lib.handle, symbol)
9494
}
9595

9696
/// Closes and frees a loaded shared library.

0 commit comments

Comments
 (0)