From 10c93807fbb24957689006f4252b4cfdc7d6c74b Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Sun, 25 Apr 2021 18:46:18 +0200 Subject: [PATCH] Replace explicit type with Self in for_value_type::<> turbofish --- gstreamer-audio/src/audio_format_info.rs | 4 ++-- gstreamer-audio/src/audio_info.rs | 4 ++-- gstreamer-video/src/video_info.rs | 8 ++++---- gstreamer-video/src/video_time_code.rs | 4 ++-- gstreamer-video/src/video_time_code_interval.rs | 4 ++-- gstreamer/src/caps_features.rs | 4 ++-- gstreamer/src/clock_time.rs | 2 +- gstreamer/src/enums.rs | 2 +- gstreamer/src/miniobject.rs | 4 ++-- gstreamer/src/static_caps.rs | 4 ++-- gstreamer/src/static_pad_template.rs | 4 ++-- gstreamer/src/structure.rs | 4 ++-- gstreamer/src/value.rs | 10 +++++----- 13 files changed, 29 insertions(+), 29 deletions(-) diff --git a/gstreamer-audio/src/audio_format_info.rs b/gstreamer-audio/src/audio_format_info.rs index 3990090c5..b34efbf82 100644 --- a/gstreamer-audio/src/audio_format_info.rs +++ b/gstreamer-audio/src/audio_format_info.rs @@ -332,7 +332,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for AudioFormatInfo { #[doc(hidden)] impl glib::value::ToValue for AudioFormatInfo { fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, @@ -351,7 +351,7 @@ impl glib::value::ToValue for AudioFormatInfo { impl glib::value::ToValueOptional for AudioFormatInfo { fn to_value_optional(s: Option<&Self>) -> glib::Value { skip_assert_initialized!(); - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, diff --git a/gstreamer-audio/src/audio_info.rs b/gstreamer-audio/src/audio_info.rs index 7f22d605c..84360bfbe 100644 --- a/gstreamer-audio/src/audio_info.rs +++ b/gstreamer-audio/src/audio_info.rs @@ -343,7 +343,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for AudioInfo { #[doc(hidden)] impl glib::value::ToValue for AudioInfo { fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, @@ -362,7 +362,7 @@ impl glib::value::ToValue for AudioInfo { impl glib::value::ToValueOptional for AudioInfo { fn to_value_optional(s: Option<&Self>) -> glib::Value { skip_assert_initialized!(); - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, diff --git a/gstreamer-video/src/video_info.rs b/gstreamer-video/src/video_info.rs index 164e25d06..a0344da7d 100644 --- a/gstreamer-video/src/video_info.rs +++ b/gstreamer-video/src/video_info.rs @@ -70,7 +70,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for VideoColorRange { impl glib::value::ToValue for VideoColorRange { fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()) } value } @@ -84,7 +84,7 @@ pub struct VideoColorimetry(ffi::GstVideoColorimetry); impl VideoColorimetry { pub fn new( - range: VideoColorRange, + range: crate::VideoColorRange, matrix: crate::VideoColorMatrix, transfer: crate::VideoTransferFunction, primaries: crate::VideoColorPrimaries, @@ -884,7 +884,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for VideoInfo { #[doc(hidden)] impl glib::value::ToValue for VideoInfo { fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, @@ -903,7 +903,7 @@ impl glib::value::ToValue for VideoInfo { impl glib::value::ToValueOptional for VideoInfo { fn to_value_optional(s: Option<&Self>) -> glib::Value { skip_assert_initialized!(); - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, diff --git a/gstreamer-video/src/video_time_code.rs b/gstreamer-video/src/video_time_code.rs index 36050b7c4..91b636d6b 100644 --- a/gstreamer-video/src/video_time_code.rs +++ b/gstreamer-video/src/video_time_code.rs @@ -445,7 +445,7 @@ macro_rules! generic_impl { #[doc(hidden)] impl glib::value::ToValue for $name { fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::<$name>(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, @@ -464,7 +464,7 @@ macro_rules! generic_impl { impl glib::value::ToValueOptional for $name { fn to_value_optional(s: Option<&Self>) -> glib::Value { skip_assert_initialized!(); - let mut value = glib::Value::for_value_type::<$name>(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, diff --git a/gstreamer-video/src/video_time_code_interval.rs b/gstreamer-video/src/video_time_code_interval.rs index 8f272d924..4ec2f0cf7 100644 --- a/gstreamer-video/src/video_time_code_interval.rs +++ b/gstreamer-video/src/video_time_code_interval.rs @@ -218,7 +218,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for VideoTimeCodeInterval { #[doc(hidden)] impl glib::value::ToValue for VideoTimeCodeInterval { fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, @@ -237,7 +237,7 @@ impl glib::value::ToValue for VideoTimeCodeInterval { impl glib::value::ToValueOptional for VideoTimeCodeInterval { fn to_value_optional(s: Option<&Self>) -> glib::Value { skip_assert_initialized!(); - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, diff --git a/gstreamer/src/caps_features.rs b/gstreamer/src/caps_features.rs index de42ede71..0571005a0 100644 --- a/gstreamer/src/caps_features.rs +++ b/gstreamer/src/caps_features.rs @@ -241,7 +241,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for CapsFeatures { impl glib::value::ToValue for CapsFeatures { fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, @@ -259,7 +259,7 @@ impl glib::value::ToValue for CapsFeatures { impl glib::value::ToValueOptional for CapsFeatures { fn to_value_optional(s: Option<&Self>) -> glib::Value { skip_assert_initialized!(); - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, diff --git a/gstreamer/src/clock_time.rs b/gstreamer/src/clock_time.rs index ede950835..4e55b7a2a 100644 --- a/gstreamer/src/clock_time.rs +++ b/gstreamer/src/clock_time.rs @@ -324,7 +324,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for ClockTime { #[doc(hidden)] impl glib::value::ToValue for ClockTime { fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_uint64(value.to_glib_none_mut().0, self.into_glib()) } diff --git a/gstreamer/src/enums.rs b/gstreamer/src/enums.rs index c229a47bb..982b765b6 100644 --- a/gstreamer/src/enums.rs +++ b/gstreamer/src/enums.rs @@ -624,7 +624,7 @@ unsafe impl<'a> FromValue<'a> for MessageType { impl ToValue for MessageType { fn to_value(&self) -> Value { - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib() as i32) } diff --git a/gstreamer/src/miniobject.rs b/gstreamer/src/miniobject.rs index 0696f02e9..97677fc87 100644 --- a/gstreamer/src/miniobject.rs +++ b/gstreamer/src/miniobject.rs @@ -441,7 +441,7 @@ macro_rules! mini_object_wrapper ( impl $crate::glib::value::ToValue for $name { fn to_value(&self) -> $crate::glib::Value { - let mut value = $crate::glib::Value::for_value_type::<$name>(); + let mut value = $crate::glib::Value::for_value_type::(); unsafe { $crate::glib::gobject_ffi::g_value_set_boxed( $crate::glib::translate::ToGlibPtrMut::to_glib_none_mut(&mut value).0, @@ -459,7 +459,7 @@ macro_rules! mini_object_wrapper ( impl $crate::glib::value::ToValueOptional for $name { fn to_value_optional(s: Option<&Self>) -> $crate::glib::Value { skip_assert_initialized!(); - let mut value = $crate::glib::Value::for_value_type::<$name>(); + let mut value = $crate::glib::Value::for_value_type::(); unsafe { $crate::glib::gobject_ffi::g_value_set_boxed( $crate::glib::translate::ToGlibPtrMut::to_glib_none_mut(&mut value).0, diff --git a/gstreamer/src/static_caps.rs b/gstreamer/src/static_caps.rs index e2e0101c1..6c9423446 100644 --- a/gstreamer/src/static_caps.rs +++ b/gstreamer/src/static_caps.rs @@ -55,7 +55,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for StaticCaps { #[doc(hidden)] impl glib::value::ToValue for StaticCaps { fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, @@ -74,7 +74,7 @@ impl glib::value::ToValue for StaticCaps { impl glib::value::ToValueOptional for StaticCaps { fn to_value_optional(s: Option<&Self>) -> glib::Value { skip_assert_initialized!(); - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, diff --git a/gstreamer/src/static_pad_template.rs b/gstreamer/src/static_pad_template.rs index 603539ac1..316d27487 100644 --- a/gstreamer/src/static_pad_template.rs +++ b/gstreamer/src/static_pad_template.rs @@ -84,7 +84,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for StaticPadTemplate { #[doc(hidden)] impl glib::value::ToValue for StaticPadTemplate { fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, @@ -103,7 +103,7 @@ impl glib::value::ToValue for StaticPadTemplate { impl glib::value::ToValueOptional for StaticPadTemplate { fn to_value_optional(s: Option<&Self>) -> glib::Value { skip_assert_initialized!(); - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, diff --git a/gstreamer/src/structure.rs b/gstreamer/src/structure.rs index d4e091c48..51f1462b5 100644 --- a/gstreamer/src/structure.rs +++ b/gstreamer/src/structure.rs @@ -316,7 +316,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for Structure { impl glib::value::ToValue for Structure { fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, @@ -335,7 +335,7 @@ impl glib::value::ToValue for Structure { impl glib::value::ToValueOptional for Structure { fn to_value_optional(s: Option<&Self>) -> glib::Value { skip_assert_initialized!(); - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { glib::gobject_ffi::g_value_set_boxed( value.to_glib_none_mut().0, diff --git a/gstreamer/src/value.rs b/gstreamer/src/value.rs index 7e900cfc1..85ffc5a24 100644 --- a/gstreamer/src/value.rs +++ b/gstreamer/src/value.rs @@ -262,7 +262,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for Fraction { impl glib::value::ToValue for Fraction { fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { ffi::gst_value_set_fraction(value.to_glib_none_mut().0, *self.numer(), *self.denom()); } @@ -381,7 +381,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for IntRange { impl glib::value::ToValue for IntRange { fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::>(); + let mut value = glib::Value::for_value_type::(); unsafe { ffi::gst_value_set_int_range_step( value.to_glib_none_mut().0, @@ -423,7 +423,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for IntRange { impl glib::value::ToValue for IntRange { fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::>(); + let mut value = glib::Value::for_value_type::(); unsafe { ffi::gst_value_set_int64_range_step( value.to_glib_none_mut().0, @@ -505,7 +505,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for FractionRange { impl glib::value::ToValue for FractionRange { fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { ffi::gst_value_set_fraction_range_full( value.to_glib_none_mut().0, @@ -609,7 +609,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for Bitmask { impl glib::value::ToValue for Bitmask { fn to_value(&self) -> glib::Value { - let mut value = glib::Value::for_value_type::(); + let mut value = glib::Value::for_value_type::(); unsafe { ffi::gst_value_set_bitmask(value.to_glib_none_mut().0, self.0); }