fix:Apply suggestions from clippy 1.88

This commit is contained in:
houseme
2025-06-27 18:16:29 +08:00
parent 35489ea352
commit 749537664f
108 changed files with 642 additions and 682 deletions
+3 -3
View File
@@ -30,7 +30,7 @@ pub fn Home() -> Element {
#[allow(clippy::redundant_closure)]
let service = use_signal(|| ServiceManager::new());
let conf = RustFSConfig::load().unwrap_or_else(|e| {
ServiceManager::show_error(&format!("加载配置失败:{}", e));
ServiceManager::show_error(&format!("加载配置失败:{e}"));
RustFSConfig::default()
});
@@ -78,7 +78,7 @@ pub fn Home() -> Element {
}
}
Err(e) => {
ServiceManager::show_error(&format!("服务启动失败:{}", e));
ServiceManager::show_error(&format!("服务启动失败:{e}"));
}
}
// Only set loading to false when it's actually done
@@ -104,7 +104,7 @@ pub fn Home() -> Element {
}
}
Err(e) => {
ServiceManager::show_error(&format!("服务停止失败:{}", e));
ServiceManager::show_error(&format!("服务停止失败:{e}"));
}
}
debug!("service_state: {:?}", service_state.read());
+1 -1
View File
@@ -49,7 +49,7 @@ pub fn Setting() -> Element {
let config = config.read().clone();
spawn(async move {
if let Err(e) = service.read().restart(config).await {
ServiceManager::show_error(&format!("发送重启命令失败:{}", e));
ServiceManager::show_error(&format!("发送重启命令失败:{e}"));
}
// reset the status when you're done
loading.set(false);