mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 02:51:10 +00:00
Fix / work around a few new clippy 1.75 warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1370>
This commit is contained in:
parent
5fe76aa785
commit
3b3c3baee5
13 changed files with 13 additions and 16 deletions
|
@ -134,7 +134,7 @@ mod auth {
|
|||
.request()
|
||||
.expect("Context without request. Should not happen !");
|
||||
|
||||
if let Some(auth_credentials) = req.parse_auth_credentials().get(0) {
|
||||
if let Some(auth_credentials) = req.parse_auth_credentials().first() {
|
||||
if let Some(authorization) = auth_credentials.authorization() {
|
||||
if let Some(user) = self.external_auth(authorization) {
|
||||
// Update context token with authenticated username
|
||||
|
|
|
@ -130,7 +130,7 @@ impl AudioConverterConfig {
|
|||
}
|
||||
|
||||
pub fn set_mix_matrix(&mut self, v: &[impl AsRef<[f32]>]) {
|
||||
let length = v.get(0).map(|v| v.as_ref().len()).unwrap_or(0);
|
||||
let length = v.first().map(|v| v.as_ref().len()).unwrap_or(0);
|
||||
let array = gst::Array::from_values(v.iter().map(|val| {
|
||||
let val = val.as_ref();
|
||||
assert_eq!(val.len(), length);
|
||||
|
|
|
@ -67,10 +67,12 @@ mod flag_serde;
|
|||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use ges::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use gio::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use glib::prelude::*;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub use gio::prelude::*;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub use gst_base::prelude::*;
|
||||
#[doc(hidden)]
|
||||
|
|
|
@ -24,4 +24,3 @@ mod auto;
|
|||
pub use auto::*;
|
||||
|
||||
mod gl_display_egl;
|
||||
pub use gl_display_egl::*;
|
||||
|
|
|
@ -24,4 +24,3 @@ mod auto;
|
|||
pub use auto::*;
|
||||
|
||||
mod gl_display_wayland;
|
||||
pub use gl_display_wayland::*;
|
||||
|
|
|
@ -24,4 +24,3 @@ mod auto;
|
|||
pub use auto::*;
|
||||
|
||||
mod gl_display_x11;
|
||||
pub use gl_display_x11::*;
|
||||
|
|
|
@ -324,6 +324,6 @@ mod test {
|
|||
|
||||
let list = elem_props.map().unwrap();
|
||||
assert_eq!(list.len(), 1);
|
||||
assert_eq!(list.get(0).unwrap(), &props_map);
|
||||
assert_eq!(list.first().unwrap(), &props_map);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,11 +80,14 @@ pub static RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS: &glib::GStr = unsafe {
|
|||
pub mod prelude {
|
||||
#[doc(hidden)]
|
||||
pub use gio::prelude::*;
|
||||
#[doc(hidden)]
|
||||
pub use gst_net::prelude::*;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub use gst_rtsp::prelude::*;
|
||||
|
||||
#[allow(unused_imports)]
|
||||
#[doc(hidden)]
|
||||
pub use gst_net::prelude::*;
|
||||
|
||||
pub use crate::{
|
||||
auto::traits::*, rtsp_address_pool::RTSPAddressPoolExtManual, rtsp_auth::RTSPAuthExtManual,
|
||||
rtsp_client::RTSPClientExtManual, rtsp_media::RTSPMediaExtManual,
|
||||
|
|
|
@ -21,7 +21,6 @@ macro_rules! skip_assert_initialized {
|
|||
}
|
||||
|
||||
mod auto;
|
||||
pub use crate::auto::*;
|
||||
|
||||
mod sdp_attribute;
|
||||
pub use crate::sdp_attribute::*;
|
||||
|
|
|
@ -794,7 +794,7 @@ mod tests {
|
|||
}
|
||||
|
||||
if i == 5 {
|
||||
consumers.get(0).unwrap().disconnect(&producer);
|
||||
consumers.first().unwrap().disconnect(&producer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ mod action;
|
|||
pub use action::{Action, ActionRef};
|
||||
|
||||
mod reporter;
|
||||
pub use reporter::*;
|
||||
|
||||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst_validate::prelude::*" without getting conflicts
|
||||
|
|
|
@ -46,7 +46,6 @@ pub use crate::caps_features::{
|
|||
CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
|
||||
};
|
||||
mod video_color_matrix;
|
||||
pub use video_color_matrix::*;
|
||||
mod video_format;
|
||||
pub use crate::video_format::*;
|
||||
mod video_format_info;
|
||||
|
|
|
@ -46,8 +46,6 @@ pub use crate::auto::*;
|
|||
#[macro_use]
|
||||
#[cfg(feature = "serde")]
|
||||
mod serde_macros;
|
||||
#[cfg(feature = "serde")]
|
||||
pub use crate::serde_macros::*;
|
||||
|
||||
#[macro_use]
|
||||
pub mod log;
|
||||
|
|
Loading…
Reference in a new issue