From 4157af997947a3e3354554ad82d449be38af8f40 Mon Sep 17 00:00:00 2001 From: tcmal Date: Sun, 4 Jun 2023 19:55:02 +0000 Subject: use std oncelock --- incria/src/deps.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'incria/src') diff --git a/incria/src/deps.rs b/incria/src/deps.rs index d72e684..acc39f1 100644 --- a/incria/src/deps.rs +++ b/incria/src/deps.rs @@ -13,11 +13,9 @@ use std::{ collections::{HashMap, VecDeque}, fmt::Write, future::Future, - sync::Mutex, + sync::{Mutex, OnceLock}, }; -use once_cell::sync::OnceCell; - /// Identifier of a node, unique across a program run. pub type NodeId = usize; @@ -112,7 +110,7 @@ struct NodeInfo { } /// The global instance of the dependency tracker -static DEP_TRACKER: OnceCell = OnceCell::new(); +static DEP_TRACKER: OnceLock = OnceLock::new(); fn dep_tracker() -> &'static DepTracker { DEP_TRACKER.get_or_init(DepTracker::default) } -- cgit v1.2.3