summaryrefslogtreecommitdiffhomepage
path: root/test/test-runner/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-runner/src')
-rw-r--r--test/test-runner/src/forward.rs7
-rw-r--r--test/test-runner/src/logging.rs4
2 files changed, 5 insertions, 6 deletions
diff --git a/test/test-runner/src/forward.rs b/test/test-runner/src/forward.rs
index a4c80ae189..01b48e647a 100644
--- a/test/test-runner/src/forward.rs
+++ b/test/test-runner/src/forward.rs
@@ -1,17 +1,16 @@
-use once_cell::sync::Lazy;
use std::{
collections::HashMap,
net::SocketAddr,
sync::{
atomic::{AtomicUsize, Ordering},
- Arc, Mutex,
+ Arc, LazyLock, Mutex,
},
};
use test_rpc::net::SockHandleId;
use tokio::net::{TcpListener, TcpStream};
-static SERVERS: Lazy<Mutex<HashMap<SockHandleId, Handle>>> =
- Lazy::new(|| Mutex::new(HashMap::new()));
+static SERVERS: LazyLock<Mutex<HashMap<SockHandleId, Handle>>> =
+ LazyLock::new(|| Mutex::new(HashMap::new()));
/// Spawn a TCP forwarder that sends TCP via `via_addr`
pub async fn start_server(
diff --git a/test/test-runner/src/logging.rs b/test/test-runner/src/logging.rs
index ffe21de985..2fb8939002 100644
--- a/test/test-runner/src/logging.rs
+++ b/test/test-runner/src/logging.rs
@@ -1,8 +1,8 @@
use log::{Level, LevelFilter, Metadata, Record, SetLoggerError};
-use once_cell::sync::Lazy;
use std::{
ffi::OsStr,
path::{Path, PathBuf},
+ sync::LazyLock,
};
use test_rpc::logging::{Error, LogFile, LogOutput, Output};
use tokio::{
@@ -22,7 +22,7 @@ const EXCLUDE_LOG_FILE_CONTAIN: &str = ".old";
/// Maximum number of lines that each log file may contain
const TRUNCATE_LOG_FILE_LINES: usize = 100;
-pub static LOGGER: Lazy<StdOutBuffer> = Lazy::new(|| {
+pub static LOGGER: LazyLock<StdOutBuffer> = LazyLock::new(|| {
let (sender, listener) = channel(MAX_OUTPUT_BUFFER);
StdOutBuffer(Mutex::new(listener), sender)
});