gstreamer: Minor cleanup

This commit is contained in:
Sebastian Dröge 2022-01-24 14:48:36 +02:00
parent ab0eb8a1a4
commit b66a00ed07

View file

@ -139,8 +139,9 @@ impl DebugCategory {
#[doc(alias = "get_description")]
#[doc(alias = "gst_debug_category_get_description")]
pub fn description<'a>(self) -> Option<&'a str> {
match self.0 {
Some(cat) => unsafe {
let cat = self.0?;
unsafe {
let ptr = ffi::gst_debug_category_get_description(cat.as_ptr());
if ptr.is_null() {
@ -148,8 +149,6 @@ impl DebugCategory {
} else {
Some(CStr::from_ptr(ptr).to_str().unwrap())
}
},
None => None,
}
}