diff --git a/gstreamer-editing-services/src/lib.rs b/gstreamer-editing-services/src/lib.rs index 153af697b..9213940a5 100644 --- a/gstreamer-editing-services/src/lib.rs +++ b/gstreamer-editing-services/src/lib.rs @@ -8,7 +8,7 @@ extern crate libc; -use std::sync::{Once, ONCE_INIT}; +use std::sync::Once; extern crate gio_sys; extern crate glib_sys; @@ -27,7 +27,7 @@ use glib::translate::from_glib; extern crate glib; extern crate gio; -static GES_INIT: Once = ONCE_INIT; +static GES_INIT: Once = Once::new(); pub use glib::{ BoolError, Cast, Continue, Error, IsA, StaticType, ToValue, Type, TypedValue, Value, diff --git a/gstreamer-pbutils/src/lib.rs b/gstreamer-pbutils/src/lib.rs index f7153bb53..c7d2e27ee 100644 --- a/gstreamer-pbutils/src/lib.rs +++ b/gstreamer-pbutils/src/lib.rs @@ -10,7 +10,7 @@ extern crate bitflags; extern crate libc; -use std::sync::{Once, ONCE_INIT}; +use std::sync::Once; #[macro_use] extern crate glib; @@ -20,7 +20,7 @@ extern crate gstreamer as gst; extern crate gstreamer_pbutils_sys as gst_pbutils_sys; extern crate gstreamer_sys as gst_sys; -static PBUTILS_INIT: Once = ONCE_INIT; +static PBUTILS_INIT: Once = Once::new(); macro_rules! assert_initialized_main_thread { () => { diff --git a/gstreamer/src/iterator.rs b/gstreamer/src/iterator.rs index 37c689097..0cf38b12c 100644 --- a/gstreamer/src/iterator.rs +++ b/gstreamer/src/iterator.rs @@ -363,10 +363,10 @@ unsafe extern "C" fn filter_boxed_unref(boxed: gpointer) { } unsafe extern "C" fn filter_boxed_get_type() -> glib_sys::GType { - use std::sync::{Once, ONCE_INIT}; + use std::sync::Once; static mut TYPE: glib_sys::GType = gobject_sys::G_TYPE_INVALID; - static ONCE: Once = ONCE_INIT; + static ONCE: Once = Once::new(); ONCE.call_once(|| { let type_name = {