mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-05-06 20:02:49 +08:00
fix: CI lint errors - openclaw_command import scope, clippy warnings
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
use crate::utils::openclaw_command;
|
||||
/// 配置读写命令
|
||||
use serde::Deserialize;
|
||||
|
||||
@@ -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"))]
|
||||
{
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user