mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-09-27 06:20:03 +00:00
Remove pointless cloning of URI in ::get_uri()
This commit is contained in:
parent
ca4fa82ffe
commit
5673201400
2 changed files with 4 additions and 4 deletions
|
@ -53,8 +53,8 @@ pub extern "C" fn sink_get_uri(ptr: *const Box<Sink>) -> *mut c_char {
|
||||||
let source: &Box<Sink> = unsafe { &*ptr };
|
let source: &Box<Sink> = unsafe { &*ptr };
|
||||||
|
|
||||||
match source.get_uri() {
|
match source.get_uri() {
|
||||||
Some(ref uri) =>
|
Some(uri) =>
|
||||||
CString::new(uri.clone().into_bytes()).unwrap().into_raw(),
|
CString::new(uri.into_bytes()).unwrap().into_raw(),
|
||||||
None =>
|
None =>
|
||||||
ptr::null_mut()
|
ptr::null_mut()
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,8 +55,8 @@ pub extern "C" fn source_get_uri(ptr: *mut Box<Source>) -> *mut c_char {
|
||||||
let source: &mut Box<Source> = unsafe { &mut *ptr };
|
let source: &mut Box<Source> = unsafe { &mut *ptr };
|
||||||
|
|
||||||
match source.get_uri() {
|
match source.get_uri() {
|
||||||
Some(ref uri) =>
|
Some(uri) =>
|
||||||
CString::new(uri.clone().into_bytes()).unwrap().into_raw(),
|
CString::new(uri.into_bytes()).unwrap().into_raw(),
|
||||||
None =>
|
None =>
|
||||||
ptr::null_mut()
|
ptr::null_mut()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue