summaryrefslogtreecommitdiff
path: root/crates/typst-syntax/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-syntax/src')
-rw-r--r--crates/typst-syntax/src/file.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/typst-syntax/src/file.rs b/crates/typst-syntax/src/file.rs
index bc7dd314..e24fc8fb 100644
--- a/crates/typst-syntax/src/file.rs
+++ b/crates/typst-syntax/src/file.rs
@@ -2,16 +2,15 @@
use std::collections::HashMap;
use std::fmt::{self, Debug, Formatter};
-use std::sync::RwLock;
-
-use once_cell::sync::Lazy;
+use std::sync::{LazyLock, RwLock};
use crate::package::PackageSpec;
use crate::VirtualPath;
/// The global package-path interner.
-static INTERNER: Lazy<RwLock<Interner>> =
- Lazy::new(|| RwLock::new(Interner { to_id: HashMap::new(), from_id: Vec::new() }));
+static INTERNER: LazyLock<RwLock<Interner>> = LazyLock::new(|| {
+ RwLock::new(Interner { to_id: HashMap::new(), from_id: Vec::new() })
+});
/// A package-path interner.
struct Interner {