Skip to content

Commit f919daa

Browse files
committed
stdarch-test: use std::sync::LazyLock instead of lazy_static!
1 parent a877191 commit f919daa

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
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.

crates/stdarch-test/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ edition = "2024"
77
[dependencies]
88
assert-instr-macro = { path = "../assert-instr-macro" }
99
simd-test-macro = { path = "../simd-test-macro" }
10-
lazy_static = "1.0"
1110
rustc-demangle = "0.1.8"
1211
cfg-if = "1.0"
1312

crates/stdarch-test/src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@
66
#![deny(rust_2018_idioms)]
77
#![allow(clippy::missing_docs_in_private_items, clippy::print_stdout)]
88

9-
#[macro_use]
10-
extern crate lazy_static;
119
#[macro_use]
1210
extern crate cfg_if;
1311

1412
pub use assert_instr_macro::*;
1513
pub use simd_test_macro::*;
16-
use std::{cmp, collections::HashSet, env, hash, hint::black_box, str};
14+
use std::{cmp, collections::HashSet, env, hash, hint::black_box, str, sync::LazyLock};
1715

1816
cfg_if! {
1917
if #[cfg(target_arch = "wasm32")] {
@@ -25,9 +23,7 @@ cfg_if! {
2523
}
2624
}
2725

28-
lazy_static! {
29-
static ref DISASSEMBLY: HashSet<Function> = disassemble_myself();
30-
}
26+
static DISASSEMBLY: LazyLock<HashSet<Function>> = LazyLock::new(disassemble_myself);
3127

3228
#[derive(Debug)]
3329
struct Function {

0 commit comments

Comments
 (0)