Skip to content

Commit

Permalink
Merge pull request #279 from tamird/mutex-new-const
Browse files Browse the repository at this point in the history
Remove `once_cell`
  • Loading branch information
sfackler authored Sep 18, 2023
2 parents 7d04b8a + 20d7da7 commit 5db1b77
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

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

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

fn convert_protocol(protocol: Protocol) -> SslProtocol {
match protocol {
Expand Down

0 comments on commit 5db1b77

Please sign in to comment.