mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-09 22:59:59 +00:00
fix:Apply suggestions from clippy 1.88
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user