[niepce] rust: Replace deprecated ONCE_INIT



commit e8741b103cf2d99e5845c0b41abd0da925981620
Author: Hubert Figuière <hub figuiere net>
Date:   Sun Oct 20 13:15:11 2019 -0400

    rust: Replace deprecated ONCE_INIT

 src/lib.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/lib.rs b/src/lib.rs
index 32bc2f0..322da35 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -44,12 +44,12 @@ pub mod niepce;
 
 include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
 
-use std::sync::{Once, ONCE_INIT};
+use std::sync::Once;
 
 /// Call this to initialize rexiv2 and the gtk-rs bindings
 #[no_mangle]
 pub extern "C" fn niepce_init() {
-    static START: Once = ONCE_INIT;
+    static START: Once = Once::new();
 
     START.call_once(|| {
         gtk::init().unwrap();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]