diff options
author | Wez Furlong <wez@wezfurlong.org> | 2019-10-20 08:39:36 +0100 |
---|---|---|
committer | Wez Furlong <wez@wezfurlong.org> | 2019-10-20 08:39:36 +0100 |
commit | ad38a85b222c8631eae8595e52a777fa148561aa (patch) | |
tree | 6950adc726642a27682eed3798689c3ca189a1d2 | |
parent | 172e8f1b38b08777367146019776a4997489888d (diff) | |
download | ssh2-rs-ad38a85b222c8631eae8595e52a777fa148561aa.zip |
migrate std::sync::ONCE_INIT -> std::sync::Once::new
-rw-r--r-- | libssh2-sys/lib.rs | 4 |
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); |