gstreamer/message: 2d attempt at printing src for Debug impl

1st attempt in c987bb0c was reverted by 89c4f68f due to
clippy "redundant clone" warning.
This commit is contained in:
François Laignel 2020-12-13 19:37:06 +01:00
parent 85e46f39f3
commit 0dce894b13

View file

@ -155,7 +155,14 @@ impl fmt::Debug for MessageRef {
CStr::from_ptr(type_).to_str().unwrap() CStr::from_ptr(type_).to_str().unwrap()
}) })
.field("seqnum", seqnum) .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()) .field("structure", &self.get_structure())
.finish() .finish()
} }