mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-05-30 21:00:30 +08:00
fix(ci): resolve cross-platform clippy warnings
This commit is contained in:
@@ -1548,10 +1548,9 @@ pub async fn get_version_info() -> Result<VersionInfo, String> {
|
||||
}
|
||||
|
||||
fn scan_cli_identity(cli_path: &std::path::Path) -> String {
|
||||
let mut identity_path = cli_path.to_path_buf();
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
let identity_path = {
|
||||
let mut identity_path = cli_path.to_path_buf();
|
||||
let file_name = cli_path
|
||||
.file_name()
|
||||
.and_then(|name| name.to_str())
|
||||
@@ -1566,7 +1565,11 @@ fn scan_cli_identity(cli_path: &std::path::Path) -> String {
|
||||
identity_path = cmd_path;
|
||||
}
|
||||
}
|
||||
}
|
||||
identity_path
|
||||
};
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
let identity_path = cli_path.to_path_buf();
|
||||
|
||||
identity_path
|
||||
.canonicalize()
|
||||
|
||||
@@ -1593,6 +1593,7 @@ pub fn invalidate_cli_detection_cache() {}
|
||||
|
||||
/// 跨平台统一的服务状态检测:纯 TCP 端口连通性(macOS/Linux 使用)
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
#[allow(dead_code)]
|
||||
fn check_tcp_service_status(_uid: u32, _label: &str) -> (bool, Option<u32>) {
|
||||
let port = crate::commands::gateway_listen_port();
|
||||
let addr = format!("127.0.0.1:{port}");
|
||||
|
||||
Reference in New Issue
Block a user