From 0d45fa3f07001cf5e7fed03c5971ea950428215e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 13 May 2023 14:10:46 +0300 Subject: [PATCH] gstreamer: Remove unnecessary `clone()` in debug logging macros The macro called from them is already doing the `clone()` itself. Part-of: --- gstreamer/src/log.rs | 64 ++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/gstreamer/src/log.rs b/gstreamer/src/log.rs index 80b720968..7275160fe 100644 --- a/gstreamer/src/log.rs +++ b/gstreamer/src/log.rs @@ -595,128 +595,128 @@ declare_debug_category_from_name!(CAT_CONTEXT, "GST_CONTEXT"); #[macro_export] macro_rules! error( ($cat:expr, obj: $obj:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Error, obj: $obj, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Error, obj: $obj, $($args)*) }}; ($cat:expr, imp: $imp:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Error, imp: $imp, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Error, imp: $imp, $($args)*) }}; ($cat:expr, id: $id:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Error, id: $id, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Error, id: $id, $($args)*) }}; ($cat:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Error, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Error, $($args)*) }}; ); #[macro_export] macro_rules! warning( ($cat:expr, obj: $obj:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Warning, obj: $obj, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Warning, obj: $obj, $($args)*) }}; ($cat:expr, imp: $imp:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Warning, imp: $imp, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Warning, imp: $imp, $($args)*) }}; ($cat:expr, id: $id:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Warning, id: $id, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Warning, id: $id, $($args)*) }}; ($cat:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Warning, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Warning, $($args)*) }}; ); #[macro_export] macro_rules! fixme( ($cat:expr, obj: $obj:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Fixme, obj: $obj, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Fixme, obj: $obj, $($args)*) }}; ($cat:expr, imp: $imp:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Fixme, imp: $imp, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Fixme, imp: $imp, $($args)*) }}; ($cat:expr, id: $id:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Fixme, id: $id, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Fixme, id: $id, $($args)*) }}; ($cat:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Fixme, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Fixme, $($args)*) }}; ); #[macro_export] macro_rules! info( ($cat:expr, obj: $obj:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Info, obj: $obj, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Info, obj: $obj, $($args)*) }}; ($cat:expr, imp: $imp:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Info, imp: $imp, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Info, imp: $imp, $($args)*) }}; ($cat:expr, id: $id:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Info, id: $id, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Info, id: $id, $($args)*) }}; ($cat:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Info, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Info, $($args)*) }}; ); #[macro_export] macro_rules! debug( ($cat:expr, obj: $obj:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Debug, obj: $obj, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Debug, obj: $obj, $($args)*) }}; ($cat:expr, imp: $imp:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Debug, imp: $imp, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Debug, imp: $imp, $($args)*) }}; ($cat:expr, id: $id:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Debug, id: $id, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Debug, id: $id, $($args)*) }}; ($cat:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Debug, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Debug, $($args)*) }}; ); #[macro_export] macro_rules! log( ($cat:expr, obj: $obj:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Log, obj: $obj, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Log, obj: $obj, $($args)*) }}; ($cat:expr, imp: $imp:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Log, imp: $imp, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Log, imp: $imp, $($args)*) }}; ($cat:expr, id: $id:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Log, id: $id, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Log, id: $id, $($args)*) }}; ($cat:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Log, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Log, $($args)*) }}; ); #[macro_export] macro_rules! trace( ($cat:expr, obj: $obj:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Trace, obj: $obj, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Trace, obj: $obj, $($args)*) }}; ($cat:expr, imp: $imp:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Trace, imp: $imp, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Trace, imp: $imp, $($args)*) }}; ($cat:expr, id: $id:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Trace, id: $id, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Trace, id: $id, $($args)*) }}; ($cat:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Trace, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Trace, $($args)*) }}; ); #[macro_export] macro_rules! memdump( ($cat:expr, obj: $obj:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Memdump, obj: $obj, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Memdump, obj: $obj, $($args)*) }}; ($cat:expr, imp: $imp:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Memdump, imp: $imp, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Memdump, imp: $imp, $($args)*) }}; ($cat:expr, id: $id:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Memdump, id: $id, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Memdump, id: $id, $($args)*) }}; ($cat:expr, $($args:tt)*) => { { - $crate::log_with_level!($cat.clone(), level: $crate::DebugLevel::Memdump, $($args)*) + $crate::log_with_level!($cat, level: $crate::DebugLevel::Memdump, $($args)*) }}; );