mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-09-29 23:32:17 +00:00
gstreamer: Minor cleanup
This commit is contained in:
parent
d2bc6d94f9
commit
93a777e6c9
1 changed files with 9 additions and 10 deletions
|
@ -139,8 +139,9 @@ impl DebugCategory {
|
||||||
#[doc(alias = "get_description")]
|
#[doc(alias = "get_description")]
|
||||||
#[doc(alias = "gst_debug_category_get_description")]
|
#[doc(alias = "gst_debug_category_get_description")]
|
||||||
pub fn description<'a>(self) -> Option<&'a str> {
|
pub fn description<'a>(self) -> Option<&'a str> {
|
||||||
match self.0 {
|
let cat = self.0?;
|
||||||
Some(cat) => unsafe {
|
|
||||||
|
unsafe {
|
||||||
let ptr = ffi::gst_debug_category_get_description(cat.as_ptr());
|
let ptr = ffi::gst_debug_category_get_description(cat.as_ptr());
|
||||||
|
|
||||||
if ptr.is_null() {
|
if ptr.is_null() {
|
||||||
|
@ -148,8 +149,6 @@ impl DebugCategory {
|
||||||
} else {
|
} else {
|
||||||
Some(CStr::from_ptr(ptr).to_str().unwrap())
|
Some(CStr::from_ptr(ptr).to_str().unwrap())
|
||||||
}
|
}
|
||||||
},
|
|
||||||
None => None,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue