Skip to content

Commit daa6af7

Browse files
fix: replace once_cell::sync::OnceCell with std::sync::OnceLock (#305)
1 parent e360da1 commit daa6af7

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ deno_terminal = "0.2.2"
3939
deno_error = "0.5.6"
4040

4141
dprint-swc-ext = "0.23.0"
42-
once_cell = "1.21.1"
4342
percent-encoding = "2.3.1"
4443
serde = { version = "1.0.219", features = ["derive"] }
4544
text_lines = { version = "0.6.0", features = ["serialization"] }

src/parsed_source.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use std::fmt;
44
use std::sync::Arc;
5+
use std::sync::OnceLock;
56

67
use dprint_swc_ext::common::SourceRange;
78
use dprint_swc_ext::common::SourceRanged;
@@ -286,7 +287,7 @@ pub(crate) struct ParsedSourceInner {
286287
pub specifier: ModuleSpecifier,
287288
pub media_type: MediaType,
288289
pub text: Arc<str>,
289-
pub source_text_info: Arc<once_cell::sync::OnceCell<SourceTextInfo>>,
290+
pub source_text_info: Arc<OnceLock<SourceTextInfo>>,
290291
pub comments: MultiThreadedComments,
291292
pub program: Arc<Program>,
292293
pub tokens: Option<Arc<Vec<TokenAndSpan>>>,

0 commit comments

Comments
 (0)