From 0dce894b13715cab3045467cfcb1b4616655ca85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laignel?= Date: Sun, 13 Dec 2020 19:37:06 +0100 Subject: [PATCH] gstreamer/message: 2d attempt at printing src for Debug impl 1st attempt in c987bb0c was reverted by 89c4f68f due to clippy "redundant clone" warning. --- gstreamer/src/message.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gstreamer/src/message.rs b/gstreamer/src/message.rs index 3e754794b..23098d7d1 100644 --- a/gstreamer/src/message.rs +++ b/gstreamer/src/message.rs @@ -155,7 +155,14 @@ impl fmt::Debug for MessageRef { CStr::from_ptr(type_).to_str().unwrap() }) .field("seqnum", seqnum) - .field("src", &self.get_src().map(|s| s.get_name())) + .field( + "src", + &self + .get_src() + .map(|s| s.get_name()) + .as_ref() + .map(glib::GString::as_str), + ) .field("structure", &self.get_structure()) .finish() }