forked from mirrors/gstreamer-rs
Replace explicit type with Self in for_value_type::<> turbofish
This commit is contained in:
parent
e8f340c60a
commit
10c93807fb
13 changed files with 29 additions and 29 deletions
|
@ -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::<AudioFormatInfo>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
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::<AudioFormatInfo>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
unsafe {
|
||||
glib::gobject_ffi::g_value_set_boxed(
|
||||
value.to_glib_none_mut().0,
|
||||
|
|
|
@ -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::<AudioInfo>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
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::<AudioInfo>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
unsafe {
|
||||
glib::gobject_ffi::g_value_set_boxed(
|
||||
value.to_glib_none_mut().0,
|
||||
|
|
|
@ -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::<VideoColorRange>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
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::<VideoInfo>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
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::<VideoInfo>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
unsafe {
|
||||
glib::gobject_ffi::g_value_set_boxed(
|
||||
value.to_glib_none_mut().0,
|
||||
|
|
|
@ -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::<Self>();
|
||||
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::<Self>();
|
||||
unsafe {
|
||||
glib::gobject_ffi::g_value_set_boxed(
|
||||
value.to_glib_none_mut().0,
|
||||
|
|
|
@ -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::<VideoTimeCodeInterval>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
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::<VideoTimeCodeInterval>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
unsafe {
|
||||
glib::gobject_ffi::g_value_set_boxed(
|
||||
value.to_glib_none_mut().0,
|
||||
|
|
|
@ -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::<CapsFeatures>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
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::<CapsFeatures>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
unsafe {
|
||||
glib::gobject_ffi::g_value_set_boxed(
|
||||
value.to_glib_none_mut().0,
|
||||
|
|
|
@ -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::<ClockTime>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
unsafe {
|
||||
glib::gobject_ffi::g_value_set_uint64(value.to_glib_none_mut().0, self.into_glib())
|
||||
}
|
||||
|
|
|
@ -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::<MessageType>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
unsafe {
|
||||
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib() as i32)
|
||||
}
|
||||
|
|
|
@ -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::<Self>();
|
||||
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::<Self>();
|
||||
unsafe {
|
||||
$crate::glib::gobject_ffi::g_value_set_boxed(
|
||||
$crate::glib::translate::ToGlibPtrMut::to_glib_none_mut(&mut value).0,
|
||||
|
|
|
@ -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::<StaticCaps>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
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::<StaticCaps>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
unsafe {
|
||||
glib::gobject_ffi::g_value_set_boxed(
|
||||
value.to_glib_none_mut().0,
|
||||
|
|
|
@ -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::<StaticPadTemplate>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
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::<StaticPadTemplate>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
unsafe {
|
||||
glib::gobject_ffi::g_value_set_boxed(
|
||||
value.to_glib_none_mut().0,
|
||||
|
|
|
@ -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::<Structure>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
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::<Structure>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
unsafe {
|
||||
glib::gobject_ffi::g_value_set_boxed(
|
||||
value.to_glib_none_mut().0,
|
||||
|
|
|
@ -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::<Fraction>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
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<i32> {
|
|||
|
||||
impl glib::value::ToValue for IntRange<i32> {
|
||||
fn to_value(&self) -> glib::Value {
|
||||
let mut value = glib::Value::for_value_type::<IntRange<i32>>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
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<i64> {
|
|||
|
||||
impl glib::value::ToValue for IntRange<i64> {
|
||||
fn to_value(&self) -> glib::Value {
|
||||
let mut value = glib::Value::for_value_type::<IntRange<i64>>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
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::<FractionRange>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
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::<Bitmask>();
|
||||
let mut value = glib::Value::for_value_type::<Self>();
|
||||
unsafe {
|
||||
ffi::gst_value_set_bitmask(value.to_glib_none_mut().0, self.0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue