refactor: streamline error handling and resource management in various modules

This commit is contained in:
Tunglies
2025-11-06 10:19:06 +08:00
parent 671ac2ebed
commit 69a706b438
13 changed files with 66 additions and 50 deletions
+2 -1
View File
@@ -68,7 +68,8 @@ impl CoreManager {
#[cfg(target_os = "windows")]
self.wait_for_service_if_needed().await;
let mode = match SERVICE_MANAGER.lock().await.current() {
let value = SERVICE_MANAGER.lock().await.current();
let mode = match value {
ServiceStatus::Ready => RunningMode::Service,
_ => RunningMode::Sidecar,
};