prelude: Remove redundant reexports already provided by other preludes

For cleanliness the prelude module only needs to reexport preludes from
direct, "top-most" crates, which themselves take care of reexporting
preludes from its dependencies again.  This shaves off some code while
maintaining the same set of exports.
This commit is contained in:
Marijn Suijten 2021-04-27 09:30:13 +02:00
parent 3ad7a18792
commit e6a81edb3c
22 changed files with 18 additions and 83 deletions

View file

@ -24,12 +24,8 @@ pub mod app_src;
pub use crate::app_src::AppSrcCallbacks;
// Re-export all the traits in a prelude module, so that applications
// can always "use gst::prelude::*" without getting conflicts
// can always "use gst_app::prelude::*" without getting conflicts
pub mod prelude {
#[doc(hidden)]
pub use glib::prelude::*;
#[doc(hidden)]
pub use gst::prelude::*;
#[doc(hidden)]
pub use gst_base::prelude::*;

View file

@ -56,12 +56,8 @@ mod audio_converter;
pub use crate::audio_converter::AudioConverterConfig;
// Re-export all the traits in a prelude module, so that applications
// can always "use gst::prelude::*" without getting conflicts
// can always "use gst_audio::prelude::*" without getting conflicts
pub mod prelude {
#[doc(hidden)]
pub use glib::prelude::*;
#[doc(hidden)]
pub use gst::prelude::*;
#[doc(hidden)]
pub use gst_base::prelude::*;

View file

@ -8,10 +8,6 @@ mod audio_sink;
mod audio_src;
pub mod prelude {
#[doc(hidden)]
pub use glib::subclass::prelude::*;
#[doc(hidden)]
pub use gst::subclass::prelude::*;
#[doc(hidden)]
pub use gst_base::subclass::prelude::*;

View file

@ -52,10 +52,8 @@ pub const BASE_PARSE_FLOW_DROPPED: gst::FlowSuccess = gst::FlowSuccess::CustomSu
pub const AGGREGATOR_FLOW_NEED_DATA: gst::FlowError = gst::FlowError::CustomError;
// Re-export all the traits in a prelude module, so that applications
// can always "use gst::prelude::*" without getting conflicts
// can always "use gst_base::prelude::*" without getting conflicts
pub mod prelude {
#[doc(hidden)]
pub use glib::prelude::*;
#[doc(hidden)]
pub use gst::prelude::*;

View file

@ -20,8 +20,6 @@ mod aggregator;
mod aggregator_pad;
pub mod prelude {
#[doc(hidden)]
pub use glib::subclass::prelude::*;
#[doc(hidden)]
pub use gst::subclass::prelude::*;

View file

@ -27,10 +27,8 @@ pub mod harness;
pub use crate::harness::Harness;
// Re-export all the traits in a prelude module, so that applications
// can always "use gst::prelude::*" without getting conflicts
// can always "use gst_check::prelude::*" without getting conflicts
pub mod prelude {
#[doc(hidden)]
pub use glib::prelude::*;
#[doc(hidden)]
pub use gst::prelude::*;

View file

@ -27,8 +27,6 @@ pub use crate::auto::*;
use crate::control_point::*;
pub mod prelude {
#[doc(hidden)]
pub use glib::prelude::*;
#[doc(hidden)]
pub use gst::prelude::*;

View file

@ -57,15 +57,11 @@ pub use crate::auto::*;
mod timeline_element;
// Re-export all the traits in a prelude module, so that applications
// can always "use gst::prelude::*" without getting conflicts
// can always "use ges::prelude::*" without getting conflicts
pub mod prelude {
#[doc(hidden)]
pub use gio::prelude::*;
#[doc(hidden)]
pub use glib::prelude::*;
#[doc(hidden)]
pub use gst::prelude::*;
#[doc(hidden)]
pub use gst_base::prelude::*;
#[doc(hidden)]
pub use gst_pbutils::prelude::*;

View file

@ -40,14 +40,8 @@ mod gl_memory;
pub use crate::gl_memory::*;
// Re-export all the traits in a prelude module, so that applications
// can always "use gst::prelude::*" without getting conflicts
// can always "use gst_gl::prelude::*" without getting conflicts
pub mod prelude {
#[doc(hidden)]
pub use glib::prelude::*;
#[doc(hidden)]
pub use gst::prelude::*;
#[doc(hidden)]
pub use gst_base::prelude::*;
#[doc(hidden)]
pub use gst_video::prelude::*;

View file

@ -4,6 +4,9 @@ mod gl_filter;
pub use self::gl_filter::GLFilterMode;
pub mod prelude {
#[doc(hidden)]
pub use gst_video::subclass::prelude::*;
pub use super::gl_base_filter::{GLBaseFilterImpl, GLBaseFilterImplExt};
pub use super::gl_filter::{GLFilterImpl, GLFilterImplExt};
}

View file

@ -32,13 +32,11 @@ pub use crate::net_address_meta::*;
mod net_address_meta;
// Re-export all the traits in a prelude module, so that applications
// can always "use gst::prelude::*" without getting conflicts
// can always "use gst_net::prelude::*" without getting conflicts
pub mod prelude {
#[doc(hidden)]
pub use gio::prelude::*;
#[doc(hidden)]
pub use glib::prelude::*;
#[doc(hidden)]
pub use gst::prelude::*;
pub use crate::auto::traits::*;

View file

@ -48,10 +48,8 @@ pub mod functions;
pub use crate::functions::*;
// Re-export all the traits in a prelude module, so that applications
// can always "use gst::prelude::*" without getting conflicts
// can always "use gst_pbutils::prelude::*" without getting conflicts
pub mod prelude {
#[doc(hidden)]
pub use glib::prelude::*;
#[doc(hidden)]
pub use gst::prelude::*;

View file

@ -35,12 +35,8 @@ mod player_video_overlay_video_renderer;
mod player_visualization;
// Re-export all the traits in a prelude module, so that applications
// can always "use gst::prelude::*" without getting conflicts
// can always "use gst_player::prelude::*" without getting conflicts
pub mod prelude {
#[doc(hidden)]
pub use glib::prelude::*;
#[doc(hidden)]
pub use gst::prelude::*;
#[doc(hidden)]
pub use gst_video::prelude::*;

View file

@ -3,8 +3,6 @@
mod player_video_renderer;
pub mod prelude {
#[doc(hidden)]
pub use glib::subclass::prelude::*;
#[doc(hidden)]
pub use gst::subclass::prelude::*;

View file

@ -29,10 +29,8 @@ pub mod rtp_buffer;
pub use crate::rtp_buffer::{compare_seqnum, RTPBuffer};
// Re-export all the traits in a prelude module, so that applications
// can always "use gst::prelude::*" without getting conflicts
// can always "use gst_rtp::prelude::*" without getting conflicts
pub mod prelude {
#[doc(hidden)]
pub use glib::prelude::*;
#[doc(hidden)]
pub use gst::prelude::*;

View file

@ -110,20 +110,14 @@ pub static RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS: Lazy<&'static str> = Lazy::new(
});
// Re-export all the traits in a prelude module, so that applications
// can always "use gst::prelude::*" without getting conflicts
// can always "use gst_rtsp_server::prelude::*" without getting conflicts
pub mod prelude {
#[doc(hidden)]
pub use gio::prelude::*;
#[doc(hidden)]
pub use glib::prelude::*;
#[doc(hidden)]
pub use gst::prelude::*;
#[doc(hidden)]
pub use gst_net::prelude::*;
#[doc(hidden)]
pub use gst_rtsp::prelude::*;
#[doc(hidden)]
pub use gst_sdp::prelude::*;
pub use crate::auto::traits::*;

View file

@ -10,8 +10,6 @@ mod rtsp_server;
pub use self::rtsp_media::SDPInfo;
pub mod prelude {
#[doc(hidden)]
pub use glib::subclass::prelude::*;
#[doc(hidden)]
pub use gst::subclass::prelude::*;

View file

@ -26,12 +26,8 @@ mod auto;
pub use crate::auto::*;
// Re-export all the traits in a prelude module, so that applications
// can always "use gst::prelude::*" without getting conflicts
// can always "use gst_rtsp::prelude::*" without getting conflicts
pub mod prelude {
#[doc(hidden)]
pub use glib::prelude::*;
#[doc(hidden)]
pub use gst::prelude::*;
#[doc(hidden)]
pub use gst_sdp::prelude::*;

View file

@ -45,10 +45,8 @@ mod sdp_zone;
pub use crate::sdp_zone::*;
// Re-export all the traits in a prelude module, so that applications
// can always "use gst::prelude::*" without getting conflicts
// can always "use gst_sdp::prelude::*" without getting conflicts
pub mod prelude {
#[doc(hidden)]
pub use glib::prelude::*;
#[doc(hidden)]
pub use gst::prelude::*;

View file

@ -103,12 +103,8 @@ pub const VIDEO_ENCODER_FLOW_NEED_DATA: gst::FlowSuccess = gst::FlowSuccess::Cus
pub const VIDEO_DECODER_FLOW_NEED_DATA: gst::FlowSuccess = gst::FlowSuccess::CustomSuccess;
// Re-export all the traits in a prelude module, so that applications
// can always "use gst::prelude::*" without getting conflicts
// can always "use gst_video::prelude::*" without getting conflicts
pub mod prelude {
#[doc(hidden)]
pub use glib::prelude::*;
#[doc(hidden)]
pub use gst::prelude::*;
#[doc(hidden)]
pub use gst_base::prelude::*;

View file

@ -7,10 +7,6 @@ mod video_encoder;
mod video_sink;
pub mod prelude {
#[doc(hidden)]
pub use glib::subclass::prelude::*;
#[doc(hidden)]
pub use gst::subclass::prelude::*;
#[doc(hidden)]
pub use gst_base::subclass::prelude::*;

View file

@ -31,12 +31,8 @@ mod web_rtc_data_channel;
mod web_rtc_session_description;
// Re-export all the traits in a prelude module, so that applications
// can always "use gst::prelude::*" without getting conflicts
// can always "use gst_webrtc::prelude::*" without getting conflicts
pub mod prelude {
#[doc(hidden)]
pub use glib::prelude::*;
#[doc(hidden)]
pub use gst::prelude::*;
#[doc(hidden)]
pub use gst_sdp::prelude::*;