Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianEddy committed Jan 15, 2025
1 parent 48ac516 commit 13e811f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ categories = [
edition = '2021'

[target.'cfg(target_os = "linux")'.dependencies]
"zbus" = "4.3.1"
"zbus" = "5.3.0"

[target.'cfg(target_os = "windows")'.dependencies.windows]
version = '0.58.0'
version = '0.59.0'
features = [
'Win32_Foundation',
'Win32_Security',
Expand Down
4 changes: 2 additions & 2 deletions src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::mem;
use windows::{
core::{HSTRING, PCWSTR},
Win32::{
Foundation::{BOOLEAN, HANDLE},
Foundation::HANDLE,
Security::{
AdjustTokenPrivileges, LookupPrivilegeValueW, SE_PRIVILEGE_ENABLED, SE_SHUTDOWN_NAME,
TOKEN_ADJUST_PRIVILEGES, TOKEN_PRIVILEGES, TOKEN_QUERY,
Expand Down Expand Up @@ -102,7 +102,7 @@ fn initiate_system_shutdown(
fn set_suspend_state(hibernate: bool) -> ShutdownResult {
unsafe {
request_privileges()?;
if SetSuspendState(BOOLEAN::from(hibernate), BOOLEAN(0), BOOLEAN(0)).0 == 0 {
if !SetSuspendState(hibernate, false, false) {
return last_os_error!();
}
}
Expand Down

0 comments on commit 13e811f

Please sign in to comment.