fix(clippy): clippy warning codes

This commit is contained in:
Tunglies
2025-03-28 11:43:21 +08:00
parent 1c046f3ca3
commit f6c0f144a6
4 changed files with 14 additions and 18 deletions

View File

@@ -576,9 +576,11 @@ impl CoreManager {
// 安装失败记录错误并使用sidecar模式
logging!(warn, Type::Core, true, "服务安装失败: {}", err);
let mut new_state = service::ServiceState::default();
new_state.last_error = Some(err.to_string());
new_state.prefer_sidecar = true; // 标记偏好sidecar模式
let new_state = service::ServiceState {
last_error: Some(err.to_string()),
prefer_sidecar: true,
..Default::default()
};
new_state.save()?;
self.start_core_by_sidecar().await?;