Skip to content

Commit 2fe2728

Browse files
committed
Remove the lazy_static dependency from rustbuild
Rustbuild already depends on once_cell which in the future can be replaced with std::lazy::Lazy.
1 parent 028c6f1 commit 2fe2728

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

Cargo.lock

-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ dependencies = [
175175
"filetime",
176176
"getopts",
177177
"ignore",
178-
"lazy_static",
179178
"libc",
180179
"merge",
181180
"num_cpus",

src/bootstrap/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ libc = "0.2"
4444
serde = { version = "1.0.8", features = ["derive"] }
4545
serde_json = "1.0.2"
4646
toml = "0.5"
47-
lazy_static = "1.3.0"
4847
time = "0.1"
4948
ignore = "0.4.10"
5049
opener = "0.5"

src/bootstrap/cache.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ use std::ops::Deref;
1313
use std::path::{Path, PathBuf};
1414
use std::sync::Mutex;
1515

16-
use lazy_static::lazy_static;
16+
// FIXME: replace with std::lazy after it gets stabilized and reaches beta
17+
use once_cell::sync::Lazy;
1718

1819
use crate::builder::Step;
1920

@@ -222,9 +223,7 @@ impl Interner {
222223
}
223224
}
224225

225-
lazy_static! {
226-
pub static ref INTERNER: Interner = Interner::default();
227-
}
226+
pub static INTERNER: Lazy<Interner> = Lazy::new(Interner::default);
228227

229228
/// This is essentially a `HashMap` which allows storing any type in its input and
230229
/// any type in its output. It is a write-once cache; values are never evicted,

0 commit comments

Comments
 (0)