Skip to content
This repository was archived by the owner on Apr 4, 2024. It is now read-only.

Commit 877ac1a

Browse files
committed
refactor: bump deps, lazy_static -> once_cell
Signed-off-by: Chojan Shang <[email protected]>
1 parent a1df224 commit 877ac1a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ edition = "2021"
1414
exclude = ["/.github/*"]
1515

1616
[dependencies]
17-
lazy_static = "1.4"
18-
parking_lot = "0.11"
19-
rand = "0.8"
20-
tracing = "0.1"
17+
once_cell = "1.9.0"
18+
parking_lot = "0.11.2"
19+
rand = "0.8.4"
20+
tracing = "0.1.29"
2121

2222
[dev-dependencies]
23-
tracing-test = "0.1"
23+
tracing-test = "0.2.1"
2424

2525
[features]
2626
failpoints = []

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,10 +525,10 @@ struct FailPointRegistry {
525525
registry: RwLock<Registry>,
526526
}
527527

528-
lazy_static::lazy_static! {
529-
static ref REGISTRY: FailPointRegistry = FailPointRegistry::default();
530-
static ref SCENARIO: Mutex<&'static FailPointRegistry> = Mutex::new(&REGISTRY);
531-
}
528+
use once_cell::sync::Lazy;
529+
530+
static REGISTRY: Lazy<FailPointRegistry> = Lazy::new(FailPointRegistry::default);
531+
static SCENARIO: Lazy<Mutex<&'static FailPointRegistry>> = Lazy::new(|| Mutex::new(&REGISTRY));
532532

533533
/// Test scenario with configured fail points.
534534
#[derive(Debug)]

0 commit comments

Comments
 (0)