mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-02 23:38:45 +00:00
Get rid of various clippy warnings
This commit is contained in:
parent
515f58da02
commit
cba662934c
4 changed files with 14 additions and 16 deletions
|
@ -146,7 +146,7 @@ impl Demuxer {
|
|||
flow_combiner: Mutex::new(Default::default()),
|
||||
group_id: Mutex::new(gst::util_group_id_next()),
|
||||
srcpads: Mutex::new(BTreeMap::new()),
|
||||
imp: Mutex::new(((demuxer_info.create_instance)(demuxer))),
|
||||
imp: Mutex::new((demuxer_info.create_instance)(demuxer)),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -345,7 +345,7 @@ impl Demuxer {
|
|||
) -> bool {
|
||||
let element = parent
|
||||
.as_ref()
|
||||
.map(|o| o.clone())
|
||||
.cloned()
|
||||
.unwrap()
|
||||
.downcast::<RsElement>()
|
||||
.unwrap();
|
||||
|
@ -390,7 +390,7 @@ impl Demuxer {
|
|||
) -> gst::FlowReturn {
|
||||
let element = parent
|
||||
.as_ref()
|
||||
.map(|o| o.clone())
|
||||
.cloned()
|
||||
.unwrap()
|
||||
.downcast::<RsElement>()
|
||||
.unwrap();
|
||||
|
@ -488,7 +488,7 @@ impl Demuxer {
|
|||
|
||||
let element = parent
|
||||
.as_ref()
|
||||
.map(|o| o.clone())
|
||||
.cloned()
|
||||
.unwrap()
|
||||
.downcast::<RsElement>()
|
||||
.unwrap();
|
||||
|
@ -523,7 +523,7 @@ impl Demuxer {
|
|||
|
||||
let element = parent
|
||||
.as_ref()
|
||||
.map(|o| o.clone())
|
||||
.cloned()
|
||||
.unwrap()
|
||||
.downcast::<RsElement>()
|
||||
.unwrap();
|
||||
|
@ -630,7 +630,7 @@ impl Demuxer {
|
|||
gst_debug!(self.cat, obj: element, "Seeked after EOS");
|
||||
*offset = u64::MAX;
|
||||
|
||||
self.stream_eos(&element, None);
|
||||
self.stream_eos(element, None);
|
||||
|
||||
true
|
||||
}
|
||||
|
|
|
@ -39,8 +39,7 @@ macro_rules! floating_reference_guard {
|
|||
pub struct FloatingReferenceGuard(*mut gobject_ffi::GObject);
|
||||
|
||||
impl FloatingReferenceGuard {
|
||||
pub fn new(obj: *mut gobject_ffi::GObject) -> Option<FloatingReferenceGuard> {
|
||||
unsafe {
|
||||
pub unsafe fn new(obj: *mut gobject_ffi::GObject) -> Option<FloatingReferenceGuard> {
|
||||
if gobject_ffi::g_object_is_floating(obj) != glib_ffi::GFALSE {
|
||||
gobject_ffi::g_object_ref_sink(obj);
|
||||
Some(FloatingReferenceGuard(obj))
|
||||
|
@ -49,7 +48,6 @@ impl FloatingReferenceGuard {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for FloatingReferenceGuard {
|
||||
fn drop(&mut self) {
|
||||
|
|
|
@ -142,7 +142,7 @@ impl<T: ObjectType> ClassStruct<T> {
|
|||
return ptr::null_mut();
|
||||
}
|
||||
|
||||
for &(t, p) in (*self.interfaces_static).iter() {
|
||||
for &(t, p) in &(*self.interfaces_static) {
|
||||
if t == type_ {
|
||||
return p;
|
||||
}
|
||||
|
|
|
@ -278,7 +278,7 @@ impl BaseSrcImpl<RsBaseSrc> for Source {
|
|||
let start = segment.get_start();
|
||||
let stop = match segment.get_stop() {
|
||||
u64::MAX => None,
|
||||
stop @ _ => Some(stop),
|
||||
stop => Some(stop),
|
||||
};
|
||||
|
||||
gst_debug!(self.cat, obj: src, "Seeking to {:?}-{:?}", start, stop);
|
||||
|
|
Loading…
Reference in a new issue