refactor: replace once_cell::sync::Lazy with std::sync::LazyLock

This commit is contained in:
link2xt
2025-04-03 13:32:02 +00:00
committed by l
parent cfaa8ceba2
commit e5b79bf405
20 changed files with 136 additions and 139 deletions

View File

@@ -424,7 +424,7 @@ pub async fn symm_decrypt<T: std::io::Read + std::io::Seek>(
#[cfg(test)]
mod tests {
use once_cell::sync::Lazy;
use std::sync::LazyLock;
use tokio::sync::OnceCell;
use super::*;
@@ -502,7 +502,7 @@ mod tests {
static CLEARTEXT: &[u8] = b"This is a test";
/// Initialised [TestKeys] for tests.
static KEYS: Lazy<TestKeys> = Lazy::new(TestKeys::new);
static KEYS: LazyLock<TestKeys> = LazyLock::new(TestKeys::new);
static CTEXT_SIGNED: OnceCell<String> = OnceCell::const_new();
static CTEXT_UNSIGNED: OnceCell<String> = OnceCell::const_new();