mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-26 18:10:35 +00:00
gstreamer/format,value: Skip init in functions that contain self
These functions were changed to return Self instead of the direct name of the type, and are hence caught by the init checker. Also remove some tabs that sit in the macro but are not cleaned up by the formatter.
This commit is contained in:
parent
4cb6b64e2d
commit
c4a06e515b
2 changed files with 7 additions and 4 deletions
|
@ -298,7 +298,7 @@ macro_rules! impl_format_value_traits(
|
|||
|
||||
impl From<$name> for GenericFormattedValue {
|
||||
fn from(v: $name) -> Self {
|
||||
skip_assert_initialized!();
|
||||
skip_assert_initialized!();
|
||||
GenericFormattedValue::$format_value(v)
|
||||
}
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ macro_rules! impl_format_value_traits(
|
|||
type Error = TryFromGenericFormattedValueError;
|
||||
|
||||
fn try_from(v: GenericFormattedValue) -> Result<$name, Self::Error> {
|
||||
skip_assert_initialized!();
|
||||
skip_assert_initialized!();
|
||||
if let GenericFormattedValue::$format_value(v) = v {
|
||||
Ok(v)
|
||||
} else {
|
||||
|
@ -320,20 +320,21 @@ macro_rules! impl_format_value_traits(
|
|||
|
||||
impl From<u64> for $name {
|
||||
fn from(v: u64) -> Self {
|
||||
skip_assert_initialized!();
|
||||
skip_assert_initialized!();
|
||||
$name(Some(v))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Option<u64>> for $name {
|
||||
fn from(v: Option<u64>) -> Self {
|
||||
skip_assert_initialized!();
|
||||
skip_assert_initialized!();
|
||||
$name(v)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<$name> for Option<u64> {
|
||||
fn from(v: $name) -> Self {
|
||||
skip_assert_initialized!();
|
||||
v.0
|
||||
}
|
||||
}
|
||||
|
@ -568,6 +569,7 @@ impl From<i64> for Undefined {
|
|||
|
||||
impl From<Undefined> for i64 {
|
||||
fn from(u: Undefined) -> Self {
|
||||
skip_assert_initialized!();
|
||||
u.0
|
||||
}
|
||||
}
|
||||
|
|
|
@ -218,6 +218,7 @@ impl From<(i32, i32)> for Fraction {
|
|||
|
||||
impl From<Fraction> for (i32, i32) {
|
||||
fn from(f: Fraction) -> Self {
|
||||
skip_assert_initialized!();
|
||||
f.0.into()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue