From 627f4d798e31f0285d60bd8ed21e02408345d60c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 6 Apr 2022 09:55:52 +0300 Subject: [PATCH] gstreamer: Get rid of some duplicated feature cfg attributes --- gstreamer/src/event.rs | 24 ------------------------ gstreamer/src/message.rs | 4 ---- 2 files changed, 28 deletions(-) diff --git a/gstreamer/src/event.rs b/gstreamer/src/event.rs index 80663dc10..4073a56e0 100644 --- a/gstreamer/src/event.rs +++ b/gstreamer/src/event.rs @@ -595,8 +595,6 @@ declare_concrete_event!(@sticky StreamCollection, T); #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StreamCollection { - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_event_new_stream_collection")] #[allow(clippy::new_ret_no_self)] pub fn new(stream_collection: &crate::StreamCollection) -> Event { @@ -604,8 +602,6 @@ impl StreamCollection { Self::builder(stream_collection).build() } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn builder(stream_collection: &crate::StreamCollection) -> StreamCollectionBuilder { assert_initialized_main_thread!(); StreamCollectionBuilder::new(stream_collection) @@ -615,8 +611,6 @@ impl StreamCollection { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StreamCollection { - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "get_stream_collection")] #[doc(alias = "gst_event_parse_stream_collection")] pub fn stream_collection(&self) -> crate::StreamCollection { @@ -745,8 +739,6 @@ declare_concrete_event!(@sticky StreamGroupDone, T); #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StreamGroupDone { - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_event_new_stream_group_done")] #[allow(clippy::new_ret_no_self)] pub fn new(group_id: GroupId) -> Event { @@ -754,8 +746,6 @@ impl StreamGroupDone { Self::builder(group_id).build() } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn builder<'a>(group_id: GroupId) -> StreamGroupDoneBuilder<'a> { assert_initialized_main_thread!(); StreamGroupDoneBuilder::new(group_id) @@ -765,8 +755,6 @@ impl StreamGroupDone { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StreamGroupDone { - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "get_group_id")] #[doc(alias = "gst_event_parse_stream_group_done")] pub fn group_id(&self) -> GroupId { @@ -1307,8 +1295,6 @@ declare_concrete_event!(SelectStreams, T); #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl SelectStreams { - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "gst_event_new_select_streams")] #[allow(clippy::new_ret_no_self)] pub fn new(streams: &[&str]) -> Event { @@ -1316,8 +1302,6 @@ impl SelectStreams { Self::builder(streams).build() } - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] pub fn builder<'a>(streams: &'a [&'a str]) -> SelectStreamsBuilder<'a> { assert_initialized_main_thread!(); SelectStreamsBuilder::new(streams) @@ -1327,8 +1311,6 @@ impl SelectStreams { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl SelectStreams { - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "get_streams")] #[doc(alias = "gst_event_parse_select_streams")] pub fn streams(&self) -> Vec { @@ -1348,8 +1330,6 @@ declare_concrete_event!(InstantRateSyncTime, T); #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] impl InstantRateSyncTime { - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(alias = "gst_event_new_instant_rate_sync_time")] #[allow(clippy::new_ret_no_self)] pub fn new( @@ -1361,8 +1341,6 @@ impl InstantRateSyncTime { Self::builder(rate_multiplier, running_time, upstream_running_time).build() } - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] pub fn builder<'a>( rate_multiplier: f64, running_time: ClockTime, @@ -1376,8 +1354,6 @@ impl InstantRateSyncTime { #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] impl InstantRateSyncTime { - #[cfg(any(feature = "v1_18", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(alias = "parse_instant_rate_sync_time")] #[doc(alias = "gst_event_parse_instant_rate_sync_time")] pub fn get(&self) -> (f64, ClockTime, ClockTime) { diff --git a/gstreamer/src/message.rs b/gstreamer/src/message.rs index 9f3c7022a..b2c0bdf74 100644 --- a/gstreamer/src/message.rs +++ b/gstreamer/src/message.rs @@ -2955,11 +2955,7 @@ impl<'a> StreamCollectionBuilder<'a> { #[must_use = "The builder must be built to be used"] pub struct StreamsSelectedBuilder<'a> { builder: MessageBuilder<'a>, - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] collection: &'a crate::StreamCollection, - #[cfg(any(feature = "v1_10", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] streams: Option>, }