mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 04:09:23 +00:00
replace lazy_static! with once_cell::sync::Lazy
This commit is contained in:
@@ -15,7 +15,7 @@ rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[dependencies]
|
||||
# Macros
|
||||
lazy_static = { version = "1", default-features = false }
|
||||
once_cell = { version = "1", default-features = false }
|
||||
serde = { version = "1", default-features = false, features = ["std", "derive"] }
|
||||
|
||||
# Encoders
|
||||
|
||||
@@ -28,12 +28,11 @@ mod binaries {
|
||||
#[allow(clippy::type_complexity)]
|
||||
mod clippy {
|
||||
use super::*;
|
||||
lazy_static::lazy_static! {
|
||||
pub(crate) static ref KEYS: Arc<RwLock<HashMap<Service, <Ristretto as Ciphersuite>::G>>> =
|
||||
Arc::new(RwLock::new(HashMap::new()));
|
||||
pub(crate) static ref QUEUES: Arc<RwLock<HashMap<(Service, Service), RwLock<Queue<Db>>>>> =
|
||||
Arc::new(RwLock::new(HashMap::new()));
|
||||
}
|
||||
use once_cell::sync::Lazy;
|
||||
pub(crate) static KEYS: Lazy<Arc<RwLock<HashMap<Service, <Ristretto as Ciphersuite>::G>>>> =
|
||||
Lazy::new(|| Arc::new(RwLock::new(HashMap::new())));
|
||||
pub(crate) static QUEUES: Lazy<Arc<RwLock<HashMap<(Service, Service), RwLock<Queue<Db>>>>>> =
|
||||
Lazy::new(|| Arc::new(RwLock::new(HashMap::new())));
|
||||
}
|
||||
pub(crate) use self::clippy::*;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user