Skip to content

Commit 44fd2c4

Browse files
committed
chore(oxc_parser): remove useless lazy_static (#9403)
Hope this can help #9054 Ref: awslabs/aws-crt-nodejs#452
1 parent 27a8e50 commit 44fd2c4

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

Cargo.lock

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/oxc_transformer/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ compact_str = { workspace = true }
3939
cow-utils = { workspace = true }
4040
indexmap = { workspace = true }
4141
itoa = { workspace = true }
42-
lazy_static = { workspace = true }
4342
rustc-hash = { workspace = true }
4443
serde = { workspace = true, features = ["derive"] }
4544
serde_json = { workspace = true }

crates/oxc_transformer/src/plugins/replace_global_defines.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use std::{cmp::Ordering, sync::Arc};
22

3-
use lazy_static::lazy_static;
43
use oxc_allocator::{Address, Allocator, GetAddress};
54
use oxc_ast::{VisitMut, ast::*};
65
use oxc_diagnostics::OxcDiagnostic;
@@ -20,9 +19,7 @@ use rustc_hash::FxHashSet;
2019
#[derive(Debug, Clone)]
2120
pub struct ReplaceGlobalDefinesConfig(Arc<ReplaceGlobalDefinesConfigImpl>);
2221

23-
lazy_static! {
24-
static ref THIS_ATOM: Atom<'static> = Atom::from("this");
25-
}
22+
static THIS_ATOM: Atom<'static> = Atom::new_const("this");
2623

2724
#[derive(Debug)]
2825
struct IdentifierDefine {

0 commit comments

Comments
 (0)