From 4e5f351205892dc272d9b89d05bcca479343195e Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 6 Aug 2024 02:01:01 +0900 Subject: [PATCH] Update windows-sys to 0.59 --- opener/Cargo.toml | 2 +- opener/src/windows.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opener/Cargo.toml b/opener/Cargo.toml index e33be09..c932e59 100644 --- a/opener/Cargo.toml +++ b/opener/Cargo.toml @@ -25,7 +25,7 @@ url = { version = "2", optional = true } [target.'cfg(windows)'.dependencies] normpath = "1" -windows-sys = { version = "0.52", features = [ +windows-sys = { version = "0.59", features = [ "Win32_Foundation", "Win32_UI_Shell", "Win32_UI_WindowsAndMessaging", diff --git a/opener/src/windows.rs b/opener/src/windows.rs index 7d50fc1..58998e4 100644 --- a/opener/src/windows.rs +++ b/opener/src/windows.rs @@ -31,7 +31,7 @@ pub(crate) fn open_helper(path: &OsStr) -> Result<(), OpenError> { let operation: Vec = OsStr::new("open\0").encode_wide().collect(); let result = unsafe { ShellExecuteW( - 0, + ptr::null_mut(), operation.as_ptr(), path.as_ptr(), ptr::null(), @@ -39,7 +39,7 @@ pub(crate) fn open_helper(path: &OsStr) -> Result<(), OpenError> { SW_SHOW, ) }; - if result > 32 { + if result as isize > 32 { Ok(()) } else { Err(OpenError::Io(io::Error::last_os_error()))