forked from mirrors/gstreamer-rs
gstreamer/message: 2d attempt at printing src for Debug impl
1st attempt inc987bb0c
was reverted by89c4f68f
due to clippy "redundant clone" warning.
This commit is contained in:
parent
85e46f39f3
commit
0dce894b13
1 changed files with 8 additions and 1 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue