Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianEddy committed Aug 16, 2023
1 parent 29ff230 commit c3fc739
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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" = "3.11.1"
"zbus" = "3.14.1"

[target.'cfg(target_os = "windows")'.dependencies.windows]
version = '0.48.0'
version = '0.51.0'
features = [
'Win32_Foundation',
'Win32_Security',
Expand Down
10 changes: 5 additions & 5 deletions src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fn request_privileges() -> ShutdownResult {
TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,
&mut token,
)
.as_bool()
.is_ok()
{
return last_os_error!();
}
Expand All @@ -49,13 +49,13 @@ fn request_privileges() -> ShutdownResult {
SE_SHUTDOWN_NAME,
&mut tkp.Privileges[0].Luid,
)
.as_bool()
.is_ok()
{
return last_os_error!();
}
tkp.PrivilegeCount = 1;
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
if !AdjustTokenPrivileges(token, false, Some(&tkp), 0, None, None).as_bool() {
if !AdjustTokenPrivileges(token, false, Some(&tkp), 0, None, None).is_ok() {
return last_os_error!();
}
}
Expand All @@ -71,7 +71,7 @@ fn exit_windows(flag: u32) -> ShutdownResult {
| SHTDN_REASON_MINOR_UPGRADE
| SHTDN_REASON_FLAG_PLANNED,
)
.as_bool()
.is_ok()
{
return last_os_error!();
}
Expand All @@ -93,7 +93,7 @@ fn initiate_system_shutdown(
force_close_apps,
restart,
)
.as_bool()
.is_ok()
{
return last_os_error!();
}
Expand Down

0 comments on commit c3fc739

Please sign in to comment.