aboutsummaryrefslogtreecommitdiff
path: root/openssl/src
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2016-08-04 22:15:50 -0700
committerSteven Fackler <[email protected]>2016-08-04 22:15:50 -0700
commitdd16f64f896c01804a03883bf15cf4d40a7a9ed8 (patch)
treee30e7ffe440939af28b48ddcf6d248c3f0dd1c02 /openssl/src
parentSupport basic SSL options without C shims (diff)
downloadrust-openssl-dd16f64f896c01804a03883bf15cf4d40a7a9ed8.tar.xz
rust-openssl-dd16f64f896c01804a03883bf15cf4d40a7a9ed8.zip
Stop once-ing init wrapper
The underlying function already once-s itself
Diffstat (limited to 'openssl/src')
-rw-r--r--openssl/src/ssl/mod.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index 39dd80de..84d3613c 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -10,7 +10,7 @@ use std::mem;
use std::str;
use std::path::Path;
use std::ptr;
-use std::sync::{Once, ONCE_INIT, Mutex, Arc};
+use std::sync::{Mutex, Arc};
use std::cmp;
use std::any::Any;
#[cfg(any(feature = "npn", feature = "alpn"))]
@@ -44,8 +44,7 @@ extern "C" {
/// Manually initialize SSL.
/// It is optional to call this function and safe to do so more than once.
pub fn init() {
- static mut INIT: Once = ONCE_INIT;
- unsafe { INIT.call_once(|| ffi::init()); }
+ ffi::init();
}
bitflags! {