Skip to content

Commit 5db1b77

Browse files
authored
Merge pull request sfackler#279 from tamird/mutex-new-const
Remove `once_cell`
2 parents 7d04b8a + 20d7da7 commit 5db1b77

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ alpn = ["security-framework/alpn"]
1919
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
2020
security-framework = "2.0.0"
2121
security-framework-sys = "2.0.0"
22-
once_cell = "1.0.0"
2322
libc = "0.2"
2423
tempfile = "3.1.0"
2524

src/imp/security_framework.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
extern crate libc;
2-
extern crate once_cell;
32
extern crate security_framework;
43
extern crate security_framework_sys;
54
extern crate tempfile;
@@ -21,8 +20,6 @@ use std::str;
2120
use std::sync::Mutex;
2221
use std::sync::Once;
2322

24-
#[cfg(not(target_os = "ios"))]
25-
use self::once_cell::sync::Lazy;
2623
#[cfg(not(target_os = "ios"))]
2724
use self::security_framework::os::macos::certificate::{PropertyType, SecCertificateExt};
2825
#[cfg(not(target_os = "ios"))]
@@ -41,7 +38,7 @@ use {Protocol, TlsAcceptorBuilder, TlsConnectorBuilder};
4138
static SET_AT_EXIT: Once = Once::new();
4239

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

4643
fn convert_protocol(protocol: Protocol) -> SslProtocol {
4744
match protocol {

0 commit comments

Comments
 (0)