forked from mirrors/gstreamer-rs
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()
|
.request()
|
||||||
.expect("Context without request. Should not happen !");
|
.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(authorization) = auth_credentials.authorization() {
|
||||||
if let Some(user) = self.external_auth(authorization) {
|
if let Some(user) = self.external_auth(authorization) {
|
||||||
// Update context token with authenticated username
|
// Update context token with authenticated username
|
||||||
|
|
|
@ -130,7 +130,7 @@ impl AudioConverterConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_mix_matrix(&mut self, v: &[impl AsRef<[f32]>]) {
|
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 array = gst::Array::from_values(v.iter().map(|val| {
|
||||||
let val = val.as_ref();
|
let val = val.as_ref();
|
||||||
assert_eq!(val.len(), length);
|
assert_eq!(val.len(), length);
|
||||||
|
|
|
@ -67,10 +67,12 @@ mod flag_serde;
|
||||||
// Re-export all the traits in a prelude module, so that applications
|
// Re-export all the traits in a prelude module, so that applications
|
||||||
// can always "use ges::prelude::*" without getting conflicts
|
// can always "use ges::prelude::*" without getting conflicts
|
||||||
pub mod prelude {
|
pub mod prelude {
|
||||||
#[doc(hidden)]
|
|
||||||
pub use gio::prelude::*;
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub use glib::prelude::*;
|
pub use glib::prelude::*;
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
|
pub use gio::prelude::*;
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub use gst_base::prelude::*;
|
pub use gst_base::prelude::*;
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
|
|
@ -24,4 +24,3 @@ mod auto;
|
||||||
pub use auto::*;
|
pub use auto::*;
|
||||||
|
|
||||||
mod gl_display_egl;
|
mod gl_display_egl;
|
||||||
pub use gl_display_egl::*;
|
|
||||||
|
|
|
@ -24,4 +24,3 @@ mod auto;
|
||||||
pub use auto::*;
|
pub use auto::*;
|
||||||
|
|
||||||
mod gl_display_wayland;
|
mod gl_display_wayland;
|
||||||
pub use gl_display_wayland::*;
|
|
||||||
|
|
|
@ -24,4 +24,3 @@ mod auto;
|
||||||
pub use auto::*;
|
pub use auto::*;
|
||||||
|
|
||||||
mod gl_display_x11;
|
mod gl_display_x11;
|
||||||
pub use gl_display_x11::*;
|
|
||||||
|
|
|
@ -324,6 +324,6 @@ mod test {
|
||||||
|
|
||||||
let list = elem_props.map().unwrap();
|
let list = elem_props.map().unwrap();
|
||||||
assert_eq!(list.len(), 1);
|
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 {
|
pub mod prelude {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub use gio::prelude::*;
|
pub use gio::prelude::*;
|
||||||
#[doc(hidden)]
|
|
||||||
pub use gst_net::prelude::*;
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub use gst_rtsp::prelude::*;
|
pub use gst_rtsp::prelude::*;
|
||||||
|
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
#[doc(hidden)]
|
||||||
|
pub use gst_net::prelude::*;
|
||||||
|
|
||||||
pub use crate::{
|
pub use crate::{
|
||||||
auto::traits::*, rtsp_address_pool::RTSPAddressPoolExtManual, rtsp_auth::RTSPAuthExtManual,
|
auto::traits::*, rtsp_address_pool::RTSPAddressPoolExtManual, rtsp_auth::RTSPAuthExtManual,
|
||||||
rtsp_client::RTSPClientExtManual, rtsp_media::RTSPMediaExtManual,
|
rtsp_client::RTSPClientExtManual, rtsp_media::RTSPMediaExtManual,
|
||||||
|
|
|
@ -21,7 +21,6 @@ macro_rules! skip_assert_initialized {
|
||||||
}
|
}
|
||||||
|
|
||||||
mod auto;
|
mod auto;
|
||||||
pub use crate::auto::*;
|
|
||||||
|
|
||||||
mod sdp_attribute;
|
mod sdp_attribute;
|
||||||
pub use crate::sdp_attribute::*;
|
pub use crate::sdp_attribute::*;
|
||||||
|
|
|
@ -794,7 +794,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
if i == 5 {
|
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};
|
pub use action::{Action, ActionRef};
|
||||||
|
|
||||||
mod reporter;
|
mod reporter;
|
||||||
pub use reporter::*;
|
|
||||||
|
|
||||||
// Re-export all the traits in a prelude module, so that applications
|
// Re-export all the traits in a prelude module, so that applications
|
||||||
// can always "use gst_validate::prelude::*" without getting conflicts
|
// 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,
|
CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
|
||||||
};
|
};
|
||||||
mod video_color_matrix;
|
mod video_color_matrix;
|
||||||
pub use video_color_matrix::*;
|
|
||||||
mod video_format;
|
mod video_format;
|
||||||
pub use crate::video_format::*;
|
pub use crate::video_format::*;
|
||||||
mod video_format_info;
|
mod video_format_info;
|
||||||
|
|
|
@ -46,8 +46,6 @@ pub use crate::auto::*;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
#[cfg(feature = "serde")]
|
#[cfg(feature = "serde")]
|
||||||
mod serde_macros;
|
mod serde_macros;
|
||||||
#[cfg(feature = "serde")]
|
|
||||||
pub use crate::serde_macros::*;
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
pub mod log;
|
pub mod log;
|
||||||
|
|
Loading…
Reference in a new issue