mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-22 01:56:28 +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 };
|
||||
|
||||
match source.get_uri() {
|
||||
Some(ref uri) =>
|
||||
CString::new(uri.clone().into_bytes()).unwrap().into_raw(),
|
||||
Some(uri) =>
|
||||
CString::new(uri.into_bytes()).unwrap().into_raw(),
|
||||
None =>
|
||||
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 };
|
||||
|
||||
match source.get_uri() {
|
||||
Some(ref uri) =>
|
||||
CString::new(uri.clone().into_bytes()).unwrap().into_raw(),
|
||||
Some(uri) =>
|
||||
CString::new(uri.into_bytes()).unwrap().into_raw(),
|
||||
None =>
|
||||
ptr::null_mut()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue