From 3ad7a187927939d2db98bac12024de178e971460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 28 Apr 2021 09:28:54 +0300 Subject: [PATCH] gstreamer: Remove unused leftover ToGlib import And directly call from_glib_borrow() instead of adding a use statement for it. --- gstreamer/src/subclass/plugin_1_12.rs | 4 +--- gstreamer/src/subclass/plugin_1_14.rs | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/gstreamer/src/subclass/plugin_1_12.rs b/gstreamer/src/subclass/plugin_1_12.rs index 9713d5e83..c57bb9b54 100644 --- a/gstreamer/src/subclass/plugin_1_12.rs +++ b/gstreamer/src/subclass/plugin_1_12.rs @@ -15,8 +15,6 @@ macro_rules! plugin_define( $version:expr, $license:expr, $source:expr, $package:expr, $origin:expr, $release_datetime:expr) => { pub mod plugin_desc { - use $crate::glib::translate::{from_glib_borrow, ToGlib, from_glib}; - #[repr(transparent)] pub struct GstPluginDesc($crate::ffi::GstPluginDesc); unsafe impl Send for GstPluginDesc {} @@ -63,7 +61,7 @@ macro_rules! plugin_define( unsafe extern "C" fn plugin_init_trampoline(plugin: *mut $crate::ffi::GstPlugin) -> $crate::glib::ffi::gboolean { use std::panic::{self, AssertUnwindSafe}; - let panic_result = panic::catch_unwind(AssertUnwindSafe(|| super::$plugin_init(&from_glib_borrow(plugin)))); + let panic_result = panic::catch_unwind(AssertUnwindSafe(|| super::$plugin_init(&$crate::glib::translate::from_glib_borrow(plugin)))); match panic_result { Ok(register_result) => match register_result { Ok(_) => $crate::glib::ffi::GTRUE, diff --git a/gstreamer/src/subclass/plugin_1_14.rs b/gstreamer/src/subclass/plugin_1_14.rs index 21b01e76d..45fec33ea 100644 --- a/gstreamer/src/subclass/plugin_1_14.rs +++ b/gstreamer/src/subclass/plugin_1_14.rs @@ -20,8 +20,6 @@ macro_rules! plugin_define( $version:expr, $license:expr, $source:expr, $package:expr, $origin:expr, $release_datetime:expr) => { pub mod plugin_desc { - use $crate::glib::translate::{from_glib_borrow, IntoGlib, from_glib}; - #[repr(transparent)] pub struct GstPluginDesc($crate::ffi::GstPluginDesc); unsafe impl Send for GstPluginDesc {} @@ -80,7 +78,7 @@ macro_rules! plugin_define( unsafe extern "C" fn plugin_init_trampoline(plugin: *mut $crate::ffi::GstPlugin) -> $crate::glib::ffi::gboolean { use std::panic::{self, AssertUnwindSafe}; - let panic_result = panic::catch_unwind(AssertUnwindSafe(|| super::$plugin_init(&from_glib_borrow(plugin)))); + let panic_result = panic::catch_unwind(AssertUnwindSafe(|| super::$plugin_init(&$crate::glib::translate::from_glib_borrow(plugin)))); match panic_result { Ok(register_result) => match register_result { Ok(_) => $crate::glib::ffi::GTRUE,