Fix some clippy warnings

This commit is contained in:
Sebastian Dröge 2020-04-11 21:18:18 +03:00
parent d7ed8d1e35
commit 62e9af58c6
6 changed files with 7 additions and 17 deletions

View file

@ -98,8 +98,7 @@ impl PlayerConfig {
pub unsafe fn into_ptr(self) -> *mut gst_sys::GstStructure {
let mut s = mem::ManuallyDrop::new(self);
let ptr = s.0.to_glib_none_mut().0;
ptr
s.0.to_glib_none_mut().0
}
}

View file

@ -199,9 +199,7 @@ impl<'a> VideoCodecFrame<'a> {
glib_sys::g_rec_mutex_unlock(stream_lock);
let s = mem::ManuallyDrop::new(self);
let ptr = s.to_glib_none().0;
ptr
s.to_glib_none().0
}
}

View file

@ -18,11 +18,10 @@ impl WebRTCSessionDescription {
assert_initialized_main_thread!();
unsafe {
let mut sdp = mem::ManuallyDrop::new(sdp);
let desc = from_glib_full(gst_web_rtc_sys::gst_webrtc_session_description_new(
from_glib_full(gst_web_rtc_sys::gst_webrtc_session_description_new(
type_.to_glib(),
sdp.to_glib_none_mut().0,
));
desc
))
}
}

View file

@ -67,9 +67,7 @@ impl CapsFeatures {
pub unsafe fn into_ptr(self) -> *mut gst_sys::GstCapsFeatures {
let s = mem::ManuallyDrop::new(self);
let ptr = s.0.as_ptr() as *mut CapsFeaturesRef as *mut gst_sys::GstCapsFeatures;
ptr
s.0.as_ptr() as *mut CapsFeaturesRef as *mut gst_sys::GstCapsFeatures
}
}

View file

@ -92,9 +92,7 @@ impl<T: MiniObject> GstRc<T> {
pub unsafe fn into_ptr(self) -> *mut T::GstType {
let s = mem::ManuallyDrop::new(self);
let ptr = s.as_mut_ptr();
ptr
s.as_mut_ptr()
}
#[cfg(any(feature = "v1_16", feature = "dox"))]

View file

@ -107,9 +107,7 @@ impl Structure {
pub unsafe fn into_ptr(self) -> *mut gst_sys::GstStructure {
let s = mem::ManuallyDrop::new(self);
let ptr = s.0.as_ptr() as *mut StructureRef as *mut gst_sys::GstStructure;
ptr
s.0.as_ptr() as *mut StructureRef as *mut gst_sys::GstStructure
}
}