Skip to content

Commit 8e08f3b

Browse files
committed
chore: Revert Clients to using static LazyLock
Signed-off-by: quexeky <[email protected]>
1 parent f0e46c4 commit 8e08f3b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

remote/src/utils.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use std::{
2-
cell::LazyCell, fs::{self, File}, io::Read
2+
fs::{self, File}, io::Read, sync::LazyLock
33
};
44

55
use drop_consts::DATA_ROOT_DIR;
@@ -17,10 +17,10 @@ impl DropHealthcheck {
1717
&self.app_name
1818
}
1919
}
20-
const DROP_CERT_BUNDLE: LazyCell<Vec<Certificate>> = LazyCell::new(fetch_certificates);
21-
pub const DROP_CLIENT_SYNC: LazyCell<reqwest::blocking::Client> = LazyCell::new(get_client_sync);
22-
pub const DROP_CLIENT_ASYNC: LazyCell<reqwest::Client> = LazyCell::new(get_client_async);
23-
pub const DROP_CLIENT_WS_CLIENT: LazyCell<reqwest::Client> = LazyCell::new(get_client_ws);
20+
static DROP_CERT_BUNDLE: LazyLock<Vec<Certificate>> = LazyLock::new(fetch_certificates);
21+
pub static DROP_CLIENT_SYNC: LazyLock<reqwest::blocking::Client> = LazyLock::new(get_client_sync);
22+
pub static DROP_CLIENT_ASYNC: LazyLock<reqwest::Client> = LazyLock::new(get_client_async);
23+
pub static DROP_CLIENT_WS_CLIENT: LazyLock<reqwest::Client> = LazyLock::new(get_client_ws);
2424

2525
fn fetch_certificates() -> Vec<Certificate> {
2626
let certificate_dir = DATA_ROOT_DIR.join("certificates");

0 commit comments

Comments
 (0)