mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-05-20 17:28:49 +00:00
Fix some clippy warnings
This commit is contained in:
parent
7139551773
commit
0cf169aa20
|
@ -78,7 +78,7 @@ impl Caps {
|
|||
let name_cstr = CString::new(value.0).unwrap();
|
||||
unsafe {
|
||||
let mut gvalue = value.1.to_gvalue();
|
||||
gst::gst_caps_set_value(self.0, name_cstr.as_ptr(), &mut gvalue);
|
||||
gst::gst_caps_set_value(self.0, name_cstr.as_ptr(), &gvalue);
|
||||
gobject::g_value_unset(&mut gvalue);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -237,7 +237,10 @@ unsafe fn sink_get_uri(ptr: *const RsSink) -> *mut c_char {
|
|||
|
||||
panic_to_error!(wrap, ptr::null_mut(), {
|
||||
match wrap.get_uri() {
|
||||
Some(uri_str) => glib::g_strdup(CString::new(uri_str).unwrap().as_ptr()),
|
||||
Some(uri_str) => {
|
||||
let uri_cstr = CString::new(uri_str).unwrap();
|
||||
glib::g_strdup(uri_cstr.as_ptr())
|
||||
}
|
||||
None => ptr::null_mut(),
|
||||
}
|
||||
})
|
||||
|
|
|
@ -269,7 +269,10 @@ unsafe fn source_get_uri(ptr: *const RsSrc) -> *mut c_char {
|
|||
|
||||
panic_to_error!(wrap, ptr::null_mut(), {
|
||||
match wrap.get_uri() {
|
||||
Some(uri_str) => glib::g_strdup(CString::new(uri_str).unwrap().as_ptr()),
|
||||
Some(uri_str) => {
|
||||
let uri_cstr = CString::new(uri_str).unwrap();
|
||||
glib::g_strdup(uri_cstr.as_ptr())
|
||||
}
|
||||
None => ptr::null_mut(),
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue