stdarch-test: use std::sync::LazyLock instead of lazy_static!

This commit is contained in:
Folkert de Vries 2025-07-10 15:48:41 +02:00
parent 5cb1e01a94
commit 7ff9bcfd1e
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
3 changed files with 2 additions and 8 deletions

View file

@ -726,7 +726,6 @@ dependencies = [
"assert-instr-macro",
"cc",
"cfg-if",
"lazy_static",
"rustc-demangle",
"simd-test-macro",
"wasmprinter",

View file

@ -7,7 +7,6 @@ edition = "2024"
[dependencies]
assert-instr-macro = { path = "../assert-instr-macro" }
simd-test-macro = { path = "../simd-test-macro" }
lazy_static = "1.0"
rustc-demangle = "0.1.8"
cfg-if = "1.0"

View file

@ -6,14 +6,12 @@
#![deny(rust_2018_idioms)]
#![allow(clippy::missing_docs_in_private_items, clippy::print_stdout)]
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate cfg_if;
pub use assert_instr_macro::*;
pub use simd_test_macro::*;
use std::{cmp, collections::HashSet, env, hash, hint::black_box, str};
use std::{cmp, collections::HashSet, env, hash, hint::black_box, str, sync::LazyLock};
cfg_if! {
if #[cfg(target_arch = "wasm32")] {
@ -25,9 +23,7 @@ cfg_if! {
}
}
lazy_static! {
static ref DISASSEMBLY: HashSet<Function> = disassemble_myself();
}
static DISASSEMBLY: LazyLock<HashSet<Function>> = LazyLock::new(disassemble_myself);
#[derive(Debug)]
struct Function {