replace once_cell (#33080)

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
This commit is contained in:
Hayashi Mikihiro 2024-08-16 13:49:50 +09:00 committed by GitHub
parent 4cc1b68546
commit 6816d11f88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 4 deletions

1
Cargo.lock generated
View file

@ -1135,7 +1135,6 @@ name = "crown"
version = "0.0.1"
dependencies = [
"compiletest_rs",
"once_cell",
]
[[package]]

View file

@ -11,7 +11,6 @@ publish = false
# so it needs to make sense without the workspace manifest.
[dev-dependencies]
compiletest_rs = { version = "0.11", features = ["tmp"] }
once_cell = "1"
[features]
default = ["unrooted_must_root_lint", "trace_in_no_trace_lint"]

View file

@ -4,11 +4,11 @@
use std::env;
use std::path::PathBuf;
use std::sync::LazyLock;
use compiletest_rs as compiletest;
use once_cell::sync::Lazy;
static PROFILE_PATH: Lazy<PathBuf> = Lazy::new(|| {
static PROFILE_PATH: LazyLock<PathBuf> = LazyLock::new(|| {
let current_exe_path = env::current_exe().unwrap();
let deps_path = current_exe_path.parent().unwrap();
let profile_path = deps_path.parent().unwrap();