fix: simplify conditional checks and improve async handler usage across multiple files (#5156)

* fix: simplify conditional checks and improve async handler usage across multiple files

* fix: add missing AsyncHandler import in find_processes_by_name function

* fix: remove redundant AsyncHandler import in find_processes_by_name function
This commit is contained in:
Tunglies
2025-10-21 22:39:32 +08:00
committed by GitHub
Unverified
parent 9c9aefe4cd
commit afb049ca17
8 changed files with 28 additions and 26 deletions

View File

@@ -65,6 +65,7 @@ impl CoreManager {
}
async fn prepare_startup(&self) -> Result<()> {
#[cfg(target_os = "windows")]
self.wait_for_service_if_needed().await;
let mode = match SERVICE_MANAGER.lock().await.current() {
@@ -121,7 +122,4 @@ impl CoreManager {
let _ = backoff::future::retry(backoff, operation).await;
}
#[cfg(not(target_os = "windows"))]
async fn wait_for_service_if_needed(&self) {}
}