Skip to content

Commit

Permalink
[nextest-runner] update to windows 0.52.0 (#1155)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshowers authored Dec 10, 2023
1 parent ceeeedc commit 8fa123d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
18 changes: 14 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nextest-runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ nix = { version = "0.27.1", default-features = false, features = ["signal"] }
# https://docs.rs/winapi/0.3.9/src/winapi/lib.rs.html#35-37
# Otherwise nextest-runner runs into compilation issues with win32job.
winapi = { version = "0.3.9", features = ["std"] }
windows = { version = "0.48.0", features = [
windows = { version = "0.52.0", features = [
"Win32_Foundation",
"Win32_Globalization",
"Win32_System_Console",
Expand Down
2 changes: 1 addition & 1 deletion nextest-runner/src/cargo_config/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ mod imp {
fn cmp(&self, other: &Self) -> cmp::Ordering {
unsafe {
let result = CompareStringOrdinal(&self.utf16, &other.utf16, true);
match result as u32 {
match result {
CSTR_LESS_THAN => cmp::Ordering::Less,
CSTR_EQUAL => cmp::Ordering::Equal,
CSTR_GREATER_THAN => cmp::Ordering::Greater,
Expand Down
12 changes: 2 additions & 10 deletions nextest-runner/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2130,15 +2130,7 @@ mod imp {
) -> Result<(), ConfigureHandleInheritanceError> {
fn set_handle_inherit(handle: HANDLE, inherit: bool) -> windows::core::Result<()> {
let flags = if inherit { HANDLE_FLAG_INHERIT.0 } else { 0 };
unsafe {
if SetHandleInformation(handle, HANDLE_FLAG_INHERIT.0, HANDLE_FLAGS(flags))
.as_bool()
{
Ok(())
} else {
Err(windows::core::Error::from_win32())
}
}
unsafe { SetHandleInformation(handle, HANDLE_FLAG_INHERIT.0, HANDLE_FLAGS(flags)) }
}

unsafe {
Expand Down Expand Up @@ -2199,7 +2191,7 @@ mod imp {
unsafe {
// Ignore the error here -- it's likely due to the process exiting.
// Note: 1 is the exit code returned by Windows.
TerminateJobObject(HANDLE(handle as isize), 1);
_ = TerminateJobObject(HANDLE(handle as isize), 1);
}
}
// Start killing the process directly for good measure.
Expand Down

0 comments on commit 8fa123d

Please sign in to comment.