replace lazy_static macro with std::sync::LazyLock

This commit is contained in:
Dmitry Shlagoff
2026-05-12 15:39:35 +02:00
parent 8dffd72db5
commit 095fa1227a
5 changed files with 5 additions and 12 deletions

View File

@@ -1,6 +1,5 @@
use base64::Engine;
use dashu::integer::{Sign, UBig};
use lazy_static::lazy_static;
use num_order::NumOrd;
use crate::arena::*;
@@ -60,6 +59,7 @@ use std::process::Child;
use std::process::Stdio;
#[cfg(feature = "http")]
use std::str::FromStr;
use std::sync::LazyLock;
#[cfg(feature = "http")]
use std::sync::{Arc, Condvar, Mutex};
@@ -9512,9 +9512,7 @@ impl Machine {
fn rng() -> &'static dyn SecureRandom {
use std::ops::Deref;
lazy_static! {
static ref RANDOM: SystemRandom = SystemRandom::new();
}
static RANDOM: LazyLock<SystemRandom> = LazyLock::new(|| SystemRandom::new());
RANDOM.deref()
}