Skip to content

Commit

Permalink
Update windows-sys to 0.59
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e authored and Seeker14491 committed Aug 6, 2024
1 parent ef8c5e4 commit 6912527
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion opener/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions opener/src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ pub(crate) fn open_helper(path: &OsStr) -> Result<(), OpenError> {
let operation: Vec<u16> = OsStr::new("open\0").encode_wide().collect();
let result = unsafe {
ShellExecuteW(
0,
ptr::null_mut(),
operation.as_ptr(),
path.as_ptr(),
ptr::null(),
ptr::null(),
SW_SHOW,
)
};
if result > 32 {
if result as usize as isize > 32 {
Ok(())
} else {
Err(OpenError::Io(io::Error::last_os_error()))
Expand Down

0 comments on commit 6912527

Please sign in to comment.