refactor: use std LazyLock

This commit is contained in:
zhom committed 2026-09-26 10:46:29 +04:00
1 parent 276d5b56f7
commit f930da1a67
40 files changed
+116 -171

No files matched your search

+2 -4
View File
@@ -39,10 +39,8 @@ impl ProfileSyncOutcome {
}
}
lazy_static::lazy_static! {
static ref SYNC_CANCEL_FLAGS: StdMutex<HashMap<String, Arc<AtomicBool>>> =
StdMutex::new(HashMap::new());
}
static SYNC_CANCEL_FLAGS: std::sync::LazyLock<StdMutex<HashMap<String, Arc<AtomicBool>>>> =
std::sync::LazyLock::new(|| StdMutex::new(HashMap::new()));
fn register_sync_cancel(profile_id: &str) -> Arc<AtomicBool> {
let mut map = SYNC_CANCEL_FLAGS.lock().unwrap();