summaryrefslogtreecommitdiff
path: root/libssh2-sys
diff options
context:
space:
mode:
authorWez Furlong <wez@wezfurlong.org>2019-10-20 08:39:36 +0100
committerWez Furlong <wez@wezfurlong.org>2019-10-20 08:39:36 +0100
commitad38a85b222c8631eae8595e52a777fa148561aa (patch)
tree6950adc726642a27682eed3798689c3ca189a1d2 /libssh2-sys
parent172e8f1b38b08777367146019776a4997489888d (diff)
downloadssh2-rs-ad38a85b222c8631eae8595e52a777fa148561aa.zip
migrate std::sync::ONCE_INIT -> std::sync::Once::new
Diffstat (limited to 'libssh2-sys')
-rw-r--r--libssh2-sys/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/libssh2-sys/lib.rs b/libssh2-sys/lib.rs
index 2428f15..3c73afb 100644
--- a/libssh2-sys/lib.rs
+++ b/libssh2-sys/lib.rs
@@ -720,9 +720,9 @@ fn smoke() {
pub fn issue_14344_workaround() {}
pub fn init() {
- use std::sync::{Once, ONCE_INIT};
+ use std::sync::Once;
- static INIT: Once = ONCE_INIT;
+ static INIT: Once = Once::new();
INIT.call_once(|| unsafe {
platform_init();
assert_eq!(libc::atexit(shutdown), 0);