forked from mirrors/gstreamer-rs
Fix new 1.52 clippy warnings
This commit is contained in:
parent
5a915e4732
commit
aa3cc48756
2 changed files with 5 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
||||||
// Take a look at the license at the top of the repository in the LICENSE file.
|
// Take a look at the license at the top of the repository in the LICENSE file.
|
||||||
|
|
||||||
use glib::translate::{from_glib, from_glib_full, FromGlibPtrFull, IntoGlib};
|
use glib::translate::{from_glib, FromGlibPtrFull, IntoGlib};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
@ -266,13 +266,11 @@ impl<'a, T> RTPBuffer<'a, T> {
|
||||||
pub fn extension_bytes(&self) -> Option<(u16, glib::Bytes)> {
|
pub fn extension_bytes(&self) -> Option<(u16, glib::Bytes)> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut bits: u16 = 0;
|
let mut bits: u16 = 0;
|
||||||
match from_glib_full(ffi::gst_rtp_buffer_get_extension_bytes(
|
Option::<glib::Bytes>::from_glib_full(ffi::gst_rtp_buffer_get_extension_bytes(
|
||||||
glib::translate::mut_override(&self.rtp_buffer),
|
glib::translate::mut_override(&self.rtp_buffer),
|
||||||
&mut bits,
|
&mut bits,
|
||||||
)) {
|
))
|
||||||
Some(bytes) => Some((bits, bytes)),
|
.map(|bytes| (bits, bytes))
|
||||||
None => None,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -756,11 +756,7 @@ impl<'a> DoubleEndedIterator for FieldIterator<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.n_fields -= 1;
|
self.n_fields -= 1;
|
||||||
if let Some(field_name) = self.structure.nth_field_name(self.n_fields) {
|
self.structure.nth_field_name(self.n_fields)
|
||||||
Some(field_name)
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue