fix: CI lint errors - openclaw_command import scope, clippy warnings

This commit is contained in:
晴天
2026-04-11 04:51:07 +08:00
parent fef694a087
commit e3af36603a
3 changed files with 2 additions and 6 deletions

View File

@@ -1,4 +1,3 @@
#[cfg(not(target_os = "macos"))]
use crate::utils::openclaw_command;
/// 配置读写命令
use serde::Deserialize;

View File

@@ -36,7 +36,7 @@ fn default_openclaw_dir() -> PathBuf {
fn panel_path_key(path: &std::path::Path) -> String {
#[cfg(target_os = "windows")]
{
return path.to_string_lossy().replace('/', "\\").to_lowercase();
path.to_string_lossy().replace('/', "\\").to_lowercase()
}
#[cfg(not(target_os = "windows"))]
{

View File

@@ -2122,8 +2122,5 @@ pub async fn claim_gateway() -> Result<(), String> {
pub async fn probe_gateway_port() -> bool {
let port = crate::commands::gateway_listen_port();
let addr = format!("127.0.0.1:{port}");
match tokio::net::TcpStream::connect(&addr).await {
Ok(_) => true,
Err(_) => false,
}
tokio::net::TcpStream::connect(&addr).await.is_ok()
}