Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ 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"
lazy_static = "1.4.0"
once_cell = "1.0.0"
libc = "0.2"
tempfile = "3.1.0"

Expand Down
7 changes: 4 additions & 3 deletions src/imp/security_framework.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
extern crate libc;
extern crate once_cell;
extern crate security_framework;
extern crate security_framework_sys;
extern crate tempfile;
Expand All @@ -20,6 +21,8 @@ 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"))]
Expand All @@ -38,9 +41,7 @@ use {Protocol, TlsAcceptorBuilder, TlsConnectorBuilder};
static SET_AT_EXIT: Once = Once::new();

#[cfg(not(target_os = "ios"))]
lazy_static! {
static ref TEMP_KEYCHAIN: Mutex<Option<(SecKeychain, TempDir)>> = Mutex::new(None);
}
static TEMP_KEYCHAIN: Lazy<Mutex<Option<(SecKeychain, TempDir)>>> = Lazy::new(|| Mutex::new(None));

fn convert_protocol(protocol: Protocol) -> SslProtocol {
match protocol {
Expand Down
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@
#![warn(missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg))]

#[macro_use]
#[cfg(any(target_os = "macos", target_os = "ios"))]
extern crate lazy_static;

use std::any::Any;
use std::error;
use std::fmt;
Expand Down