From f9fa7f55fcb9b5c92750d220e0571fc31f2140b5 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Thu, 6 Jul 2023 15:38:29 +0200 Subject: [PATCH] Use re-exported once_cell Part-of: --- examples/Cargo.toml | 1 - examples/src/bin/cairo_compositor.rs | 2 +- examples/src/bin/custom_meta.rs | 2 +- examples/src/bin/fd_allocator.rs | 2 +- examples/src/bin/glfilter.rs | 2 +- examples/src/bin/subclass.rs | 2 +- gstreamer-allocators/Cargo.toml | 1 - gstreamer-allocators/src/caps_features.rs | 2 +- gstreamer-app/Cargo.toml | 1 - gstreamer-app/src/app_sink.rs | 2 +- gstreamer-app/src/app_src.rs | 2 +- gstreamer-audio/Cargo.toml | 1 - gstreamer-audio/src/audio_format.rs | 2 +- gstreamer-base/Cargo.toml | 1 - gstreamer-base/src/subclass/base_transform.rs | 4 ++-- gstreamer-controller/Cargo.toml | 1 - gstreamer-gl/Cargo.toml | 1 - gstreamer-gl/src/caps_features.rs | 2 +- gstreamer-play/Cargo.toml | 1 - gstreamer-play/src/subclass/play_video_renderer.rs | 2 +- gstreamer-player/Cargo.toml | 1 - gstreamer-player/src/subclass/player_video_renderer.rs | 2 +- gstreamer-rtp/Cargo.toml | 1 - gstreamer-rtsp-server/Cargo.toml | 1 - gstreamer-rtsp-server/src/subclass/rtsp_media_factory.rs | 2 +- gstreamer-utils/Cargo.toml | 1 - gstreamer-utils/src/streamproducer.rs | 2 +- gstreamer-video/Cargo.toml | 1 - gstreamer-video/src/caps_features.rs | 2 +- gstreamer-video/src/video_format.rs | 2 +- gstreamer/Cargo.toml | 1 - gstreamer/src/bus.rs | 2 +- gstreamer/src/caps_features.rs | 2 +- gstreamer/src/log.rs | 2 +- gstreamer/src/serde_macros.rs | 2 +- gstreamer/src/subclass/element.rs | 4 ++-- gstreamer/src/value_serde.rs | 2 +- 37 files changed, 25 insertions(+), 39 deletions(-) diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 8de652501..cb9512954 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -36,7 +36,6 @@ cairo-rs = { git = "https://github.com/gtk-rs/gtk-rs-core", features=["use_glib" pango = { git = "https://github.com/gtk-rs/gtk-rs-core", optional = true } pangocairo = { git = "https://github.com/gtk-rs/gtk-rs-core", optional = true } glutin = { version = "0.29", optional = true } -once_cell = "1.0" image = { version = "0.24", optional = true, default-features = false, features = ["png", "jpeg"] } memmap2 = { version = "0.7", optional = true } memfd = { version = "0.6", optional = true } diff --git a/examples/src/bin/cairo_compositor.rs b/examples/src/bin/cairo_compositor.rs index a4d5483d7..e6927c565 100644 --- a/examples/src/bin/cairo_compositor.rs +++ b/examples/src/bin/cairo_compositor.rs @@ -10,9 +10,9 @@ mod examples_common; // Our custom compositor element is defined in this module. mod cairo_compositor { + use glib::once_cell::sync::Lazy; use gst_base::subclass::prelude::*; use gst_video::{prelude::*, subclass::prelude::*}; - use once_cell::sync::Lazy; // In the imp submodule we include the actual implementation of the compositor. mod imp { diff --git a/examples/src/bin/custom_meta.rs b/examples/src/bin/custom_meta.rs index e4104951c..5d2b879d0 100644 --- a/examples/src/bin/custom_meta.rs +++ b/examples/src/bin/custom_meta.rs @@ -71,8 +71,8 @@ mod custom_meta { mod imp { use std::{mem, ptr}; + use glib::once_cell::sync::Lazy; use glib::translate::*; - use once_cell::sync::Lazy; pub(super) struct CustomMetaParams { pub label: String, diff --git a/examples/src/bin/fd_allocator.rs b/examples/src/bin/fd_allocator.rs index fa298afaf..1b1ef6055 100644 --- a/examples/src/bin/fd_allocator.rs +++ b/examples/src/bin/fd_allocator.rs @@ -361,11 +361,11 @@ mod video_filter { use std::{mem::ManuallyDrop, os::unix::prelude::FromRawFd}; use anyhow::Error; + use glib::once_cell::sync::Lazy; use gst::{subclass::prelude::*, PadDirection, PadPresence, PadTemplate}; use gst_app::gst_base::subclass::BaseTransformMode; use gst_video::{subclass::prelude::*, VideoFrameRef}; use memmap2::MmapMut; - use once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( diff --git a/examples/src/bin/glfilter.rs b/examples/src/bin/glfilter.rs index d9ba595c7..cd19d409d 100644 --- a/examples/src/bin/glfilter.rs +++ b/examples/src/bin/glfilter.rs @@ -30,13 +30,13 @@ void main () { mod mirror { use std::sync::Mutex; + use glib::once_cell::sync::Lazy; use gst_base::subclass::BaseTransformMode; use gst_gl::{ prelude::*, subclass::{prelude::*, GLFilterMode}, *, }; - use once_cell::sync::Lazy; use super::{gl, FRAGMENT_SHADER}; diff --git a/examples/src/bin/subclass.rs b/examples/src/bin/subclass.rs index cb11e2381..8e1549376 100644 --- a/examples/src/bin/subclass.rs +++ b/examples/src/bin/subclass.rs @@ -17,8 +17,8 @@ mod examples_common; // Our custom FIR filter element is defined in this module mod fir_filter { use byte_slice_cast::*; + use glib::once_cell::sync::Lazy; use gst_base::subclass::prelude::*; - use once_cell::sync::Lazy; // The debug category we use below for our filter pub static CAT: Lazy = Lazy::new(|| { diff --git a/gstreamer-allocators/Cargo.toml b/gstreamer-allocators/Cargo.toml index 346b1a781..18cf91aa7 100644 --- a/gstreamer-allocators/Cargo.toml +++ b/gstreamer-allocators/Cargo.toml @@ -18,7 +18,6 @@ libc = "0.2" ffi = { package = "gstreamer-allocators-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } -once_cell = "1.0" [dev-dependencies] gir-format-check = "0.1" diff --git a/gstreamer-allocators/src/caps_features.rs b/gstreamer-allocators/src/caps_features.rs index ee09a5e2d..f4eab3354 100644 --- a/gstreamer-allocators/src/caps_features.rs +++ b/gstreamer-allocators/src/caps_features.rs @@ -1,7 +1,7 @@ // Take a look at the license at the top of the repository in the LICENSE file. +use glib::once_cell::sync::Lazy; use gst::CapsFeatures; -use once_cell::sync::Lazy; pub static CAPS_FEATURES_MEMORY_DMABUF: Lazy = Lazy::new(|| CapsFeatures::new([crate::CAPS_FEATURE_MEMORY_DMABUF])); diff --git a/gstreamer-app/Cargo.toml b/gstreamer-app/Cargo.toml index 252167c84..57e12e563 100644 --- a/gstreamer-app/Cargo.toml +++ b/gstreamer-app/Cargo.toml @@ -21,7 +21,6 @@ ffi = { package = "gstreamer-app-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } gst-base = { package = "gstreamer-base", path = "../gstreamer-base" } -once_cell = "1.0" [dev-dependencies] futures-util = { version = "0.3", features = ["sink"] } diff --git a/gstreamer-app/src/app_sink.rs b/gstreamer-app/src/app_sink.rs index 584b71693..ccf92cf8d 100644 --- a/gstreamer-app/src/app_sink.rs +++ b/gstreamer-app/src/app_sink.rs @@ -351,7 +351,7 @@ impl AppSink { #[doc(alias = "gst_app_sink_set_callbacks")] pub fn set_callbacks(&self, callbacks: AppSinkCallbacks) { #[cfg(not(feature = "v1_18"))] - use once_cell::sync::Lazy; + use glib::once_cell::sync::Lazy; #[cfg(not(feature = "v1_18"))] static SET_ONCE_QUARK: Lazy = Lazy::new(|| glib::Quark::from_str("gstreamer-rs-app-sink-callbacks")); diff --git a/gstreamer-app/src/app_src.rs b/gstreamer-app/src/app_src.rs index 4b8c6b58a..d1c231563 100644 --- a/gstreamer-app/src/app_src.rs +++ b/gstreamer-app/src/app_src.rs @@ -224,7 +224,7 @@ impl AppSrc { #[doc(alias = "gst_app_src_set_callbacks")] pub fn set_callbacks(&self, callbacks: AppSrcCallbacks) { #[cfg(not(feature = "v1_18"))] - use once_cell::sync::Lazy; + use glib::once_cell::sync::Lazy; #[cfg(not(feature = "v1_18"))] static SET_ONCE_QUARK: Lazy = Lazy::new(|| glib::Quark::from_str("gstreamer-rs-app-src-callbacks")); diff --git a/gstreamer-audio/Cargo.toml b/gstreamer-audio/Cargo.toml index c80ae8560..7e2f5ea0b 100644 --- a/gstreamer-audio/Cargo.toml +++ b/gstreamer-audio/Cargo.toml @@ -20,7 +20,6 @@ ffi = { package = "gstreamer-audio-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } gst-base = { package = "gstreamer-base", path = "../gstreamer-base" } -once_cell = "1.0" serde = { version = "1.0", optional = true } [dev-dependencies] diff --git a/gstreamer-audio/src/audio_format.rs b/gstreamer-audio/src/audio_format.rs index 62b130090..92e9aedb9 100644 --- a/gstreamer-audio/src/audio_format.rs +++ b/gstreamer-audio/src/audio_format.rs @@ -2,8 +2,8 @@ use std::str; +use glib::once_cell::sync::Lazy; use glib::translate::{from_glib, IntoGlib}; -use once_cell::sync::Lazy; #[cfg(feature = "v1_18")] pub static AUDIO_FORMATS_ALL: Lazy> = Lazy::new(|| unsafe { diff --git a/gstreamer-base/Cargo.toml b/gstreamer-base/Cargo.toml index dbfd0b9a0..64fc32ef8 100644 --- a/gstreamer-base/Cargo.toml +++ b/gstreamer-base/Cargo.toml @@ -20,7 +20,6 @@ ffi = { package = "gstreamer-base-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } atomic_refcell = "0.1" -once_cell = "1" [dev-dependencies] gir-format-check = "0.1" diff --git a/gstreamer-base/src/subclass/base_transform.rs b/gstreamer-base/src/subclass/base_transform.rs index b1255951b..b6e6c41df 100644 --- a/gstreamer-base/src/subclass/base_transform.rs +++ b/gstreamer-base/src/subclass/base_transform.rs @@ -1310,7 +1310,7 @@ mod tests { impl ElementImpl for TestTransform { fn metadata() -> Option<&'static gst::subclass::ElementMetadata> { - use once_cell::sync::Lazy; + use glib::once_cell::sync::Lazy; static ELEMENT_METADATA: Lazy = Lazy::new(|| { gst::subclass::ElementMetadata::new( "Test Transform", @@ -1324,7 +1324,7 @@ mod tests { } fn pad_templates() -> &'static [gst::PadTemplate] { - use once_cell::sync::Lazy; + use glib::once_cell::sync::Lazy; static PAD_TEMPLATES: Lazy> = Lazy::new(|| { let caps = gst::Caps::new_any(); vec![ diff --git a/gstreamer-controller/Cargo.toml b/gstreamer-controller/Cargo.toml index 1004bc19d..685ff53a2 100644 --- a/gstreamer-controller/Cargo.toml +++ b/gstreamer-controller/Cargo.toml @@ -14,7 +14,6 @@ edition = "2021" rust-version = "1.66" [dependencies] -once_cell = "1.0" ffi = { package = "gstreamer-controller-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } diff --git a/gstreamer-gl/Cargo.toml b/gstreamer-gl/Cargo.toml index 6d33bdee8..5fb5f09ed 100644 --- a/gstreamer-gl/Cargo.toml +++ b/gstreamer-gl/Cargo.toml @@ -18,7 +18,6 @@ rust-version = "1.66" [dependencies] libc = "0.2" -once_cell = "1.0" ffi = { package = "gstreamer-gl-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } diff --git a/gstreamer-gl/src/caps_features.rs b/gstreamer-gl/src/caps_features.rs index 786d426aa..a220b0e72 100644 --- a/gstreamer-gl/src/caps_features.rs +++ b/gstreamer-gl/src/caps_features.rs @@ -1,7 +1,7 @@ // Take a look at the license at the top of the repository in the LICENSE file. +use glib::once_cell::sync::Lazy; use gst::CapsFeatures; -use once_cell::sync::Lazy; pub static CAPS_FEATURES_MEMORY_GL_MEMORY: Lazy = Lazy::new(|| CapsFeatures::new([crate::CAPS_FEATURE_MEMORY_GL_MEMORY])); diff --git a/gstreamer-play/Cargo.toml b/gstreamer-play/Cargo.toml index b38f0a2b2..26b998e13 100644 --- a/gstreamer-play/Cargo.toml +++ b/gstreamer-play/Cargo.toml @@ -19,7 +19,6 @@ ffi = { package = "gstreamer-play-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer", features = ["v1_20"] } gst-video = { package = "gstreamer-video", path = "../gstreamer-video", features = ["v1_20"] } -once_cell = "1.0" [dev-dependencies] gir-format-check = "0.1" diff --git a/gstreamer-play/src/subclass/play_video_renderer.rs b/gstreamer-play/src/subclass/play_video_renderer.rs index 793b94a8c..7e66111e8 100644 --- a/gstreamer-play/src/subclass/play_video_renderer.rs +++ b/gstreamer-play/src/subclass/play_video_renderer.rs @@ -49,7 +49,7 @@ unsafe extern "C" fn video_renderer_create_video_sink( video_renderer: *mut ffi::GstPlayVideoRenderer, play: *mut ffi::GstPlay, ) -> *mut gst::ffi::GstElement { - use once_cell::sync::Lazy; + use glib::once_cell::sync::Lazy; static VIDEO_SINK_QUARK: Lazy = Lazy::new(|| glib::Quark::from_str("gstreamer-rs-play-video-sink")); diff --git a/gstreamer-player/Cargo.toml b/gstreamer-player/Cargo.toml index 54d528136..54a3ffcdf 100644 --- a/gstreamer-player/Cargo.toml +++ b/gstreamer-player/Cargo.toml @@ -19,7 +19,6 @@ ffi = { package = "gstreamer-player-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } gst-video = { package = "gstreamer-video", path = "../gstreamer-video" } -once_cell = "1.0" [dev-dependencies] gir-format-check = "0.1" diff --git a/gstreamer-player/src/subclass/player_video_renderer.rs b/gstreamer-player/src/subclass/player_video_renderer.rs index 915179f29..8e70225ab 100644 --- a/gstreamer-player/src/subclass/player_video_renderer.rs +++ b/gstreamer-player/src/subclass/player_video_renderer.rs @@ -49,7 +49,7 @@ unsafe extern "C" fn video_renderer_create_video_sink *mut gst::ffi::GstElement { - use once_cell::sync::Lazy; + use glib::once_cell::sync::Lazy; static VIDEO_SINK_QUARK: Lazy = Lazy::new(|| glib::Quark::from_str("gstreamer-rs-player-video-sink")); diff --git a/gstreamer-rtp/Cargo.toml b/gstreamer-rtp/Cargo.toml index f2205c91e..98cea9801 100644 --- a/gstreamer-rtp/Cargo.toml +++ b/gstreamer-rtp/Cargo.toml @@ -14,7 +14,6 @@ edition = "2021" rust-version = "1.66" [dependencies] -once_cell = "1.0" libc = "0.2" ffi = { package = "gstreamer-rtp-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } diff --git a/gstreamer-rtsp-server/Cargo.toml b/gstreamer-rtsp-server/Cargo.toml index c62a7875a..074055c61 100644 --- a/gstreamer-rtsp-server/Cargo.toml +++ b/gstreamer-rtsp-server/Cargo.toml @@ -15,7 +15,6 @@ rust-version = "1.66" [dependencies] libc = "0.2" -once_cell = "1.0" ffi = { package = "gstreamer-rtsp-server-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gio = { git = "https://github.com/gtk-rs/gtk-rs-core" } diff --git a/gstreamer-rtsp-server/src/subclass/rtsp_media_factory.rs b/gstreamer-rtsp-server/src/subclass/rtsp_media_factory.rs index 0f298dee0..dccaed903 100644 --- a/gstreamer-rtsp-server/src/subclass/rtsp_media_factory.rs +++ b/gstreamer-rtsp-server/src/subclass/rtsp_media_factory.rs @@ -224,7 +224,7 @@ unsafe extern "C" fn factory_create_pipeline( ptr: *mut ffi::GstRTSPMediaFactory, media: *mut ffi::GstRTSPMedia, ) -> *mut gst::ffi::GstElement { - use once_cell::sync::Lazy; + use glib::once_cell::sync::Lazy; static PIPELINE_QUARK: Lazy = Lazy::new(|| glib::Quark::from_str("gstreamer-rs-rtsp-media-pipeline")); diff --git a/gstreamer-utils/Cargo.toml b/gstreamer-utils/Cargo.toml index f45fd7399..339a07848 100644 --- a/gstreamer-utils/Cargo.toml +++ b/gstreamer-utils/Cargo.toml @@ -19,7 +19,6 @@ rust-version = "1.66" gst = { package = "gstreamer", path = "../gstreamer", features = ["v1_20"] } gst_app = { package = "gstreamer-app", path = "../gstreamer-app", features = ["v1_20"] } gst_video = { package = "gstreamer-video", path = "../gstreamer-video", features = ["v1_20"] } -once_cell = "1" thiserror = "1" [dev-dependencies] diff --git a/gstreamer-utils/src/streamproducer.rs b/gstreamer-utils/src/streamproducer.rs index 23b917cef..a5a5ba9ce 100644 --- a/gstreamer-utils/src/streamproducer.rs +++ b/gstreamer-utils/src/streamproducer.rs @@ -4,8 +4,8 @@ use std::{ sync::{atomic, Arc, Mutex}, }; +use glib::once_cell::sync::Lazy; use gst::{glib, prelude::*}; -use once_cell::sync::Lazy; use thiserror::Error; static CAT: Lazy = Lazy::new(|| { diff --git a/gstreamer-video/Cargo.toml b/gstreamer-video/Cargo.toml index a8bab3e8d..a2eb621b7 100644 --- a/gstreamer-video/Cargo.toml +++ b/gstreamer-video/Cargo.toml @@ -20,7 +20,6 @@ ffi = { package = "gstreamer-video-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } gst = { package = "gstreamer", path = "../gstreamer" } gst-base = { package = "gstreamer-base", path = "../gstreamer-base" } -once_cell = "1.0" futures-channel = "0.3" serde = { version = "1.0", optional = true, features = ["derive"] } diff --git a/gstreamer-video/src/caps_features.rs b/gstreamer-video/src/caps_features.rs index 6f16ebbeb..76b089c2b 100644 --- a/gstreamer-video/src/caps_features.rs +++ b/gstreamer-video/src/caps_features.rs @@ -1,7 +1,7 @@ // Take a look at the license at the top of the repository in the LICENSE file. +use glib::once_cell::sync::Lazy; use gst::CapsFeatures; -use once_cell::sync::Lazy; #[cfg(feature = "v1_16")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))] diff --git a/gstreamer-video/src/video_format.rs b/gstreamer-video/src/video_format.rs index ef8d18beb..addc4c4c7 100644 --- a/gstreamer-video/src/video_format.rs +++ b/gstreamer-video/src/video_format.rs @@ -2,8 +2,8 @@ use std::str; +use glib::once_cell::sync::Lazy; use glib::translate::{from_glib, FromGlib, IntoGlib}; -use once_cell::sync::Lazy; #[cfg(feature = "v1_18")] pub static VIDEO_FORMATS_ALL: Lazy> = Lazy::new(|| unsafe { diff --git a/gstreamer/Cargo.toml b/gstreamer/Cargo.toml index 421d73411..48aca508c 100644 --- a/gstreamer/Cargo.toml +++ b/gstreamer/Cargo.toml @@ -20,7 +20,6 @@ ffi = { package = "gstreamer-sys", path = "sys" } glib = { git = "https://github.com/gtk-rs/gtk-rs-core" } num-integer = { version = "0.1", default-features = false, features = [] } num-rational = { version = "0.4", default-features = false, features = [] } -once_cell = "1.0" futures-core = "0.3" futures-channel = "0.3" futures-util = { version = "0.3", default-features = false } diff --git a/gstreamer/src/bus.rs b/gstreamer/src/bus.rs index 542eda190..f1e1683ed 100644 --- a/gstreamer/src/bus.rs +++ b/gstreamer/src/bus.rs @@ -192,7 +192,7 @@ impl Bus { F: Fn(&Bus, &Message) -> BusSyncReply + Send + Sync + 'static, { #[cfg(not(feature = "v1_18"))] - use once_cell::sync::Lazy; + use glib::once_cell::sync::Lazy; #[cfg(not(feature = "v1_18"))] static SET_ONCE_QUARK: Lazy = Lazy::new(|| glib::Quark::from_str("gstreamer-rs-sync-handler")); diff --git a/gstreamer/src/caps_features.rs b/gstreamer/src/caps_features.rs index 546a0f11b..ced15b694 100644 --- a/gstreamer/src/caps_features.rs +++ b/gstreamer/src/caps_features.rs @@ -9,8 +9,8 @@ use std::{ ptr, str, }; +use glib::once_cell::sync::Lazy; use glib::{translate::*, IntoGStr, StaticType}; -use once_cell::sync::Lazy; #[doc(alias = "GstCapsFeatures")] #[repr(transparent)] diff --git a/gstreamer/src/log.rs b/gstreamer/src/log.rs index 65d98052d..d8e1e4dd8 100644 --- a/gstreamer/src/log.rs +++ b/gstreamer/src/log.rs @@ -2,9 +2,9 @@ use std::{borrow::Cow, ffi::CStr, fmt, ptr}; +use glib::once_cell::sync::Lazy; use glib::{ffi::gpointer, prelude::*, translate::*, IntoGStr, IntoOptionalGStr}; use libc::c_char; -use once_cell::sync::Lazy; use crate::DebugLevel; diff --git a/gstreamer/src/serde_macros.rs b/gstreamer/src/serde_macros.rs index 1f2235538..577c7b7b8 100644 --- a/gstreamer/src/serde_macros.rs +++ b/gstreamer/src/serde_macros.rs @@ -43,7 +43,7 @@ macro_rules! bitflags_serialize_impl { where S: serde::Serializer, { - use once_cell::sync::Lazy; + use glib::once_cell::sync::Lazy; let mut handled = Self::empty(); let mut res = String::new(); diff --git a/gstreamer/src/subclass/element.rs b/gstreamer/src/subclass/element.rs index b13f9ce30..833a61a13 100644 --- a/gstreamer/src/subclass/element.rs +++ b/gstreamer/src/subclass/element.rs @@ -616,7 +616,7 @@ mod tests { impl ElementImpl for TestElement { fn metadata() -> Option<&'static ElementMetadata> { - use once_cell::sync::Lazy; + use glib::once_cell::sync::Lazy; static ELEMENT_METADATA: Lazy = Lazy::new(|| { ElementMetadata::new( "Test Element", @@ -630,7 +630,7 @@ mod tests { } fn pad_templates() -> &'static [PadTemplate] { - use once_cell::sync::Lazy; + use glib::once_cell::sync::Lazy; static PAD_TEMPLATES: Lazy> = Lazy::new(|| { let caps = crate::Caps::new_any(); vec![ diff --git a/gstreamer/src/value_serde.rs b/gstreamer/src/value_serde.rs index b4330f53b..e68230570 100644 --- a/gstreamer/src/value_serde.rs +++ b/gstreamer/src/value_serde.rs @@ -4,9 +4,9 @@ use std::{fmt, mem}; +use glib::once_cell::sync::Lazy; use glib::{Date, StaticType, ToValue}; use num_rational::Rational32; -use once_cell::sync::Lazy; use serde::{ de, de::{Deserialize, Deserializer, SeqAccess, Visitor},