fix(ci): gate Windows-only functions with #[cfg(target_os = windows)] for Clippy

This commit is contained in:
晴天
2026-03-11 03:09:25 +08:00
parent 16999e66b7
commit 436932e545
2 changed files with 3 additions and 1 deletions

2
src-tauri/Cargo.lock generated
View File

@@ -328,7 +328,7 @@ dependencies = [
[[package]]
name = "clawpanel"
version = "0.7.3"
version = "0.7.4"
dependencies = [
"base64 0.22.1",
"chrono",

View File

@@ -18,11 +18,13 @@ fn description_map() -> HashMap<&'static str, &'static str> {
])
}
#[cfg(target_os = "windows")]
fn looks_like_gateway_command_line(command_line: &str) -> bool {
let text = command_line.to_ascii_lowercase();
text.contains("openclaw") && text.contains("gateway")
}
#[cfg(target_os = "windows")]
fn parse_listening_pids_from_netstat(stdout: &str, port: u16) -> Vec<u32> {
let port_pattern = format!(":{port}");
let mut pids = HashSet::new();