From f260fa4f8d181ad70aaa0f06668e20b7225cd784 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Wed, 2 Dec 2020 22:27:19 +0100 Subject: [PATCH] gstreamer/event: Use autogenerated EventType::get_name --- gstreamer/src/event.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gstreamer/src/event.rs b/gstreamer/src/event.rs index 8c11503c2..9999c26db 100644 --- a/gstreamer/src/event.rs +++ b/gstreamer/src/event.rs @@ -249,10 +249,7 @@ impl fmt::Debug for EventRef { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("Event") .field("ptr", unsafe { &self.as_ptr() }) - .field("type", &unsafe { - let type_ = ffi::gst_event_type_get_name((*self.as_ptr()).type_); - CStr::from_ptr(type_).to_str().unwrap() - }) + .field("type", &self.get_type().get_name()) .field("seqnum", &self.get_seqnum()) .field("structure", &self.get_structure()) .finish()