diff --git a/src/routes.rs b/src/routes.rs index f9b10b5..02a99e9 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -25,7 +25,7 @@ use crate::state::RwLockServerState; pub const BASE64_CONFIG: base64::Config = base64::Config::new(base64::CharacterSet::UrlSafe, false); -static HTTP_CLIENT: Lazy = Lazy::new(|| Client::new()); +static HTTP_CLIENT: Lazy = Lazy::new(Client::new); const SERVER_ID_STRING: &str = concat!( env!("CARGO_CRATE_NAME"), diff --git a/src/state.rs b/src/state.rs index ba8b8bc..b64a4e7 100644 --- a/src/state.rs +++ b/src/state.rs @@ -102,9 +102,11 @@ impl ServerState { } let tls = resp.tls.unwrap(); - let _ = TLS_PREVIOUSLY_CREATED.set(ArcSwap::from_pointee(tls.created_at)); - let _ = TLS_SIGNING_KEY.set(ArcSwap::new(tls.priv_key)); - let _ = TLS_CERTS.set(ArcSwap::from_pointee(tls.certs)); + std::mem::drop( + TLS_PREVIOUSLY_CREATED.set(ArcSwap::from_pointee(tls.created_at)), + ); + std::mem::drop(TLS_SIGNING_KEY.set(ArcSwap::new(tls.priv_key))); + std::mem::drop(TLS_CERTS.set(ArcSwap::from_pointee(tls.certs))); Ok(Self { precomputed_key: key,