chore: remove duplicate PCSTR (#897)

This commit is contained in:
Amr Bashir
2024-03-27 04:10:25 +02:00
committed by GitHub
parent 9ecac8119b
commit 2d0a2d781d

View File

@@ -257,7 +257,6 @@ impl CursorIcon {
pub(super) fn get_function_impl(library: &str, function: &str) -> FARPROC {
let library = encode_wide(library);
assert_eq!(function.chars().last(), Some('\0'));
let function = PCSTR::from_raw(function.as_ptr());
// Library names we will use are ASCII so we can use the A version to avoid string conversion.
let module = unsafe { LoadLibraryW(PCWSTR::from_raw(library.as_ptr())) }.unwrap_or_default();