From 9890803cc6a27e40ec63b44fa2f696c29e1e8c27 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Thu, 7 Jan 2021 20:08:36 +0100 Subject: [PATCH] gstreamer: Fix clippy::from_over_into --- gstreamer/src/format.rs | 12 ++++++------ gstreamer/src/value.rs | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gstreamer/src/format.rs b/gstreamer/src/format.rs index 9f00e3e2f..ada74b050 100644 --- a/gstreamer/src/format.rs +++ b/gstreamer/src/format.rs @@ -332,9 +332,9 @@ macro_rules! impl_format_value_traits( } } - impl Into> for $name { - fn into(self) -> Option { - self.0 + impl From<$name> for Option { + fn from(v: $name) -> Self { + v.0 } } @@ -566,9 +566,9 @@ impl From for Undefined { } } -impl Into for Undefined { - fn into(self) -> i64 { - self.0 +impl From for i64 { + fn from(u: Undefined) -> Self { + u.0 } } diff --git a/gstreamer/src/value.rs b/gstreamer/src/value.rs index 8a29d4be4..11510db83 100644 --- a/gstreamer/src/value.rs +++ b/gstreamer/src/value.rs @@ -216,9 +216,9 @@ impl From<(i32, i32)> for Fraction { } } -impl Into<(i32, i32)> for Fraction { - fn into(self) -> (i32, i32) { - self.0.into() +impl From for (i32, i32) { + fn from(f: Fraction) -> Self { + f.0.into() } }