summaryrefslogtreecommitdiffstats
path: root/src/client/access_token.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/access_token.rs')
-rw-r--r--src/client/access_token.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/client/access_token.rs b/src/client/access_token.rs
index 0f69d9a..e09e02c 100644
--- a/src/client/access_token.rs
+++ b/src/client/access_token.rs
@@ -2,11 +2,10 @@ use anyhow::{anyhow, Result};
use chrono::Utc;
use indexmap::IndexMap;
use parking_lot::RwLock;
+use std::sync::LazyLock;
-lazy_static::lazy_static! {
- static ref ACCESS_TOKENS: RwLock<IndexMap<String, (String, i64)>> =
- RwLock::new(IndexMap::new());
-}
+static ACCESS_TOKENS: LazyLock<RwLock<IndexMap<String, (String, i64)>>> =
+ LazyLock::new(|| RwLock::new(IndexMap::new()));
pub fn get_access_token(client_name: &str) -> Result<String> {
ACCESS_TOKENS