aboutsummaryrefslogtreecommitdiff
path: root/incria/src
diff options
context:
space:
mode:
authortcmal <tcmal>2023-06-04 19:55:02 +0000
committerAria <me@aria.rip>2023-10-01 17:31:29 +0100
commit4157af997947a3e3354554ad82d449be38af8f40 (patch)
tree21493b3b43c3da590bec55fd7ba0c70adabd2d63 /incria/src
parent2c1525849f3e47587f58c7afbd3020c8076c9f4e (diff)
use std oncelock
Diffstat (limited to 'incria/src')
-rw-r--r--incria/src/deps.rs6
1 files changed, 2 insertions, 4 deletions
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<DepTracker> = OnceCell::new();
+static DEP_TRACKER: OnceLock<DepTracker> = OnceLock::new();
fn dep_tracker() -> &'static DepTracker {
DEP_TRACKER.get_or_init(DepTracker::default)
}