diff --git a/Cargo.toml b/Cargo.toml index cab1d47..a27b617 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,6 @@ alpn = ["security-framework/alpn"] [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] security-framework = "2.0.0" security-framework-sys = "2.0.0" -once_cell = "1.0.0" libc = "0.2" tempfile = "3.1.0" diff --git a/src/imp/security_framework.rs b/src/imp/security_framework.rs index f56a916..511badf 100644 --- a/src/imp/security_framework.rs +++ b/src/imp/security_framework.rs @@ -1,5 +1,4 @@ extern crate libc; -extern crate once_cell; extern crate security_framework; extern crate security_framework_sys; extern crate tempfile; @@ -21,8 +20,6 @@ use std::str; use std::sync::Mutex; use std::sync::Once; -#[cfg(not(target_os = "ios"))] -use self::once_cell::sync::Lazy; #[cfg(not(target_os = "ios"))] use self::security_framework::os::macos::certificate::{PropertyType, SecCertificateExt}; #[cfg(not(target_os = "ios"))] @@ -41,7 +38,7 @@ use {Protocol, TlsAcceptorBuilder, TlsConnectorBuilder}; static SET_AT_EXIT: Once = Once::new(); #[cfg(not(target_os = "ios"))] -static TEMP_KEYCHAIN: Lazy>> = Lazy::new(|| Mutex::new(None)); +static TEMP_KEYCHAIN: Mutex> = Mutex::new(None); fn convert_protocol(protocol: Protocol) -> SslProtocol { match protocol {