Skip to content

Commit 7677e3f

Browse files
doublegateclaude
andcommitted
fix(windows): Revert to correct Win32::UI::Shell::IsUserAnAdmin import
The previous commit incorrectly changed the import path to Win32::Security::Authorization::IsUserAnAdmin, which doesn't exist. The correct import is Win32::UI::Shell::IsUserAnAdmin as documented at: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/UI/Shell/fn.IsUserAnAdmin.html Changes: - crates/prtip-network/src/privilege.rs: Restored Win32::UI::Shell import - Cargo.toml: Removed unnecessary Win32_Security_Authorization feature This fixes the Windows build failure in GitHub Actions CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8604553 commit 7677e3f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ indicatif = "0.17"
6060
# Platform-specific (shared definitions)
6161
nix = { version = "0.27", features = ["user", "process"] }
6262
libc = "0.2"
63-
windows = { version = "0.52", features = ["Win32_Security", "Win32_Security_Authorization", "Win32_Foundation", "Win32_NetworkManagement_IpHelper", "Win32_UI_Shell"] }
63+
windows = { version = "0.52", features = ["Win32_Security", "Win32_Foundation", "Win32_NetworkManagement_IpHelper", "Win32_UI_Shell"] }
6464

6565
[workspace.package]
6666
version = "0.3.0"

crates/prtip-network/src/privilege.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ fn unix_drop_privileges(user: &str, group: &str) -> Result<()> {
158158
#[cfg(target_os = "windows")]
159159
fn windows_has_capability() -> Result<bool> {
160160
use windows::Win32::Foundation::BOOL;
161-
use windows::Win32::Security::Authorization::IsUserAnAdmin;
161+
use windows::Win32::UI::Shell::IsUserAnAdmin;
162162

163163
unsafe {
164164
let is_admin: BOOL = IsUserAnAdmin();

0 commit comments

Comments
 (0)