mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-18 14:16:45 +00:00
Fix / silence new Rust 1.83 clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1604>
This commit is contained in:
parent
3bc4076aee
commit
6913e930cd
80 changed files with 222 additions and 196 deletions
|
@ -90,7 +90,7 @@ mod custom_meta {
|
|||
|
||||
*TYPE.get_or_init(|| unsafe {
|
||||
let t = glib::Type::from_glib(gst::ffi::gst_meta_api_type_register(
|
||||
b"MyCustomMetaAPI\0".as_ptr() as *const _,
|
||||
c"MyCustomMetaAPI".as_ptr() as *const _,
|
||||
// We provide no tags here as our meta is just a label and does
|
||||
// not refer to any specific aspect of the buffer.
|
||||
[ptr::null::<std::os::raw::c_char>()].as_ptr() as *mut *const _,
|
||||
|
@ -163,7 +163,7 @@ mod custom_meta {
|
|||
MetaInfo(
|
||||
ptr::NonNull::new(gst::ffi::gst_meta_register(
|
||||
custom_meta_api_get_type().into_glib(),
|
||||
b"MyCustomMeta\0".as_ptr() as *const _,
|
||||
c"MyCustomMeta".as_ptr() as *const _,
|
||||
mem::size_of::<CustomMeta>(),
|
||||
Some(custom_meta_init),
|
||||
Some(custom_meta_free),
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/// macOS has a specific requirement that there must be a run loop running on the main thread in
|
||||
/// order to open windows and use OpenGL, and that the global NSApplication instance must be
|
||||
/// initialized.
|
||||
|
||||
/// On macOS this launches the callback function on a thread.
|
||||
/// On other platforms it's just executed immediately.
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
|
|
|
@ -43,7 +43,7 @@ static IDENTITY: [f32; 16] = [
|
|||
0.0, 0.0, 0.0, 1.0,
|
||||
];
|
||||
|
||||
const VS_SRC: &[u8] = b"
|
||||
const VS_SRC: &[u8] = c"
|
||||
uniform mat4 u_transformation;
|
||||
attribute vec4 a_position;
|
||||
attribute vec2 a_texcoord;
|
||||
|
@ -52,10 +52,10 @@ varying vec2 v_texcoord;
|
|||
void main() {
|
||||
gl_Position = u_transformation * a_position;
|
||||
v_texcoord = a_texcoord;
|
||||
}
|
||||
\0";
|
||||
}"
|
||||
.to_bytes();
|
||||
|
||||
const FS_SRC: &[u8] = b"
|
||||
const FS_SRC: &[u8] = c"
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -64,8 +64,8 @@ uniform sampler2D tex;
|
|||
|
||||
void main() {
|
||||
gl_FragColor = texture2D(tex, v_texcoord);
|
||||
}
|
||||
\0";
|
||||
}"
|
||||
.to_bytes();
|
||||
|
||||
#[allow(clippy::unreadable_literal)]
|
||||
#[allow(clippy::unused_unit)]
|
||||
|
@ -149,12 +149,12 @@ impl Gl {
|
|||
|
||||
let location = self
|
||||
.gl
|
||||
.GetUniformLocation(self.program, b"tex\0".as_ptr() as *const _);
|
||||
.GetUniformLocation(self.program, c"tex".as_ptr() as *const _);
|
||||
self.gl.Uniform1i(location, 0);
|
||||
|
||||
let location = self
|
||||
.gl
|
||||
.GetUniformLocation(self.program, b"u_transformation\0".as_ptr() as *const _);
|
||||
.GetUniformLocation(self.program, c"u_transformation".as_ptr() as *const _);
|
||||
self.gl
|
||||
.UniformMatrix4fv(location, 1, gl::FALSE, IDENTITY.as_ptr() as *const _);
|
||||
|
||||
|
@ -222,8 +222,8 @@ fn load(gl_display: &impl glutin::display::GlDisplay) -> Gl {
|
|||
assert_eq!(gl.GetError(), 0);
|
||||
}
|
||||
|
||||
let attr_position = gl.GetAttribLocation(program, b"a_position\0".as_ptr() as *const _);
|
||||
let attr_texture = gl.GetAttribLocation(program, b"a_texcoord\0".as_ptr() as *const _);
|
||||
let attr_position = gl.GetAttribLocation(program, c"a_position".as_ptr() as *const _);
|
||||
let attr_texture = gl.GetAttribLocation(program, c"a_texcoord".as_ptr() as *const _);
|
||||
|
||||
let vao = if gl.BindVertexArray.is_loaded() {
|
||||
let mut vao = mem::MaybeUninit::uninit();
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use glib;
|
||||
|
|
|
@ -91,7 +91,7 @@ unsafe fn from(t: ffi::GstAnalyticsMtd) -> ffi::GstAnalyticsClsMtd {
|
|||
std::mem::transmute(t)
|
||||
}
|
||||
|
||||
impl<'a> AnalyticsMtdRef<'a, AnalyticsClassificationMtd> {
|
||||
impl AnalyticsMtdRef<'_, AnalyticsClassificationMtd> {
|
||||
#[doc(alias = "gst_analytics_cls_mtd_get_length")]
|
||||
pub fn len(&self) -> usize {
|
||||
unsafe {
|
||||
|
@ -139,7 +139,7 @@ pub struct AnalyticsClassificationIterator<'a> {
|
|||
length: usize,
|
||||
}
|
||||
|
||||
impl<'a> Iterator for AnalyticsClassificationIterator<'a> {
|
||||
impl Iterator for AnalyticsClassificationIterator<'_> {
|
||||
type Item = (glib::Quark, f32);
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use glib;
|
||||
|
|
|
@ -24,8 +24,8 @@ pub trait AnalyticsRelationMetaODExt: sealed::Sealed {
|
|||
) -> Result<AnalyticsMtdRef<AnalyticsODMtd>, glib::BoolError>;
|
||||
}
|
||||
|
||||
impl<'a> AnalyticsRelationMetaODExt
|
||||
for gst::MetaRefMut<'a, AnalyticsRelationMeta, gst::meta::Standalone>
|
||||
impl AnalyticsRelationMetaODExt
|
||||
for gst::MetaRefMut<'_, AnalyticsRelationMeta, gst::meta::Standalone>
|
||||
{
|
||||
#[doc(alias = "gst_analytics_relation_meta_add_od_mtd")]
|
||||
fn add_od_mtd(
|
||||
|
@ -80,7 +80,7 @@ unsafe fn from(t: ffi::GstAnalyticsMtd) -> ffi::GstAnalyticsODMtd {
|
|||
std::mem::transmute(t)
|
||||
}
|
||||
|
||||
impl<'a> AnalyticsMtdRef<'a, AnalyticsODMtd> {
|
||||
impl AnalyticsMtdRef<'_, AnalyticsODMtd> {
|
||||
#[doc(alias = "gst_analytics_od_mtd_get_obj_type")]
|
||||
pub fn obj_type(&self) -> Option<glib::Quark> {
|
||||
unsafe {
|
||||
|
|
|
@ -225,12 +225,12 @@ mod sealed {
|
|||
pub trait AnalyticsMetaRefExt<'a>: sealed::Sealed {
|
||||
#[doc(alias = "gst_analytics_relation_meta_get_mtd")]
|
||||
fn mtd<T: AnalyticsMtd>(&self, an_meta_id: u32) -> Option<AnalyticsMtdRef<'a, T>>;
|
||||
fn iter<T: AnalyticsMtd>(&'a self) -> AnalyticsMtdIter<T>;
|
||||
fn iter<T: AnalyticsMtd>(&'a self) -> AnalyticsMtdIter<'a, T>;
|
||||
fn iter_direct_related<T: AnalyticsMtd>(
|
||||
&'a self,
|
||||
an_meta_id: u32,
|
||||
rel_type: RelTypes,
|
||||
) -> AnalyticsMtdIter<T>;
|
||||
) -> AnalyticsMtdIter<'a, T>;
|
||||
}
|
||||
|
||||
impl<'a> AnalyticsMetaRefExt<'a> for gst::MetaRef<'a, AnalyticsRelationMeta> {
|
||||
|
@ -260,7 +260,7 @@ impl<'a> AnalyticsMetaRefExt<'a> for gst::MetaRef<'a, AnalyticsRelationMeta> {
|
|||
&'a self,
|
||||
an_meta_id: u32,
|
||||
rel_type: RelTypes,
|
||||
) -> AnalyticsMtdIter<T> {
|
||||
) -> AnalyticsMtdIter<'a, T> {
|
||||
AnalyticsMtdIter::new_direct_related(self, an_meta_id, rel_type.into_glib())
|
||||
}
|
||||
}
|
||||
|
@ -339,12 +339,12 @@ pub trait AnalyticsMetaRefMutExt<'a>: sealed::Sealed {
|
|||
fn mtd_mut<T: AnalyticsMtd>(&'a mut self, an_meta_id: u32)
|
||||
-> Option<AnalyticsMtdRefMut<'a, T>>;
|
||||
|
||||
fn iter_mut<T: AnalyticsMtd>(&'a mut self) -> AnalyticsMtdIterMut<T>;
|
||||
fn iter_mut<T: AnalyticsMtd>(&'a mut self) -> AnalyticsMtdIterMut<'a, T>;
|
||||
fn iter_direct_related_mut<T: AnalyticsMtd>(
|
||||
&'a mut self,
|
||||
an_meta_id: u32,
|
||||
rel_type: RelTypes,
|
||||
) -> AnalyticsMtdIterMut<T>;
|
||||
) -> AnalyticsMtdIterMut<'a, T>;
|
||||
}
|
||||
|
||||
impl<'a> AnalyticsMetaRefMutExt<'a>
|
||||
|
@ -372,14 +372,14 @@ impl<'a> AnalyticsMetaRefMutExt<'a>
|
|||
}
|
||||
}
|
||||
|
||||
fn iter_mut<T: AnalyticsMtd>(&'a mut self) -> AnalyticsMtdIterMut<T> {
|
||||
fn iter_mut<T: AnalyticsMtd>(&'a mut self) -> AnalyticsMtdIterMut<'a, T> {
|
||||
AnalyticsMtdIterMut::new(self)
|
||||
}
|
||||
fn iter_direct_related_mut<T: AnalyticsMtd>(
|
||||
&'a mut self,
|
||||
an_meta_id: u32,
|
||||
rel_type: RelTypes,
|
||||
) -> AnalyticsMtdIterMut<T> {
|
||||
) -> AnalyticsMtdIterMut<'a, T> {
|
||||
AnalyticsMtdIterMut::new_direct_related(self, an_meta_id, rel_type.into_glib())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,9 @@ impl<'a> glib::translate::ToGlibPtrMut<'a, *mut ffi::GstTensorDim> for TensorDim
|
|||
type Storage = PhantomData<&'a mut Self>;
|
||||
|
||||
#[inline]
|
||||
fn to_glib_none_mut(&'a mut self) -> glib::translate::StashMut<*mut ffi::GstTensorDim, Self> {
|
||||
fn to_glib_none_mut(
|
||||
&'a mut self,
|
||||
) -> glib::translate::StashMut<'a, *mut ffi::GstTensorDim, Self> {
|
||||
glib::translate::StashMut(self as *mut _ as *mut _, PhantomData)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@ pub trait AnalyticsRelationMetaTrackingExt: sealed::Sealed {
|
|||
) -> Result<AnalyticsMtdRef<AnalyticsTrackingMtd>, glib::BoolError>;
|
||||
}
|
||||
|
||||
impl<'a> AnalyticsRelationMetaTrackingExt
|
||||
for gst::MetaRefMut<'a, AnalyticsRelationMeta, gst::meta::Standalone>
|
||||
impl AnalyticsRelationMetaTrackingExt
|
||||
for gst::MetaRefMut<'_, AnalyticsRelationMeta, gst::meta::Standalone>
|
||||
{
|
||||
#[doc(alias = "gst_analytics_relation_meta_add_tracking_mtd")]
|
||||
fn add_tracking_mtd(
|
||||
|
@ -59,7 +59,7 @@ unsafe fn from(t: ffi::GstAnalyticsMtd) -> ffi::GstAnalyticsTrackingMtd {
|
|||
std::mem::transmute(t)
|
||||
}
|
||||
|
||||
impl<'a> AnalyticsMtdRef<'a, AnalyticsTrackingMtd> {
|
||||
impl AnalyticsMtdRef<'_, AnalyticsTrackingMtd> {
|
||||
#[doc(alias = "gst_analytics_tracking_mtd_get_info")]
|
||||
pub fn info(&self) -> (u64, gst::ClockTime, gst::ClockTime, bool) {
|
||||
let mut tracking_id: u64 = 0;
|
||||
|
@ -87,7 +87,7 @@ impl<'a> AnalyticsMtdRef<'a, AnalyticsTrackingMtd> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> AnalyticsMtdRefMut<'a, AnalyticsTrackingMtd> {
|
||||
impl AnalyticsMtdRefMut<'_, AnalyticsTrackingMtd> {
|
||||
#[doc(alias = "gst_analytics_tracking_mtd_update_last_seen")]
|
||||
pub fn update_last_seen(&mut self, last_seen: gst::ClockTime) -> Result<(), glib::BoolError> {
|
||||
let ret: bool = unsafe {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use glib;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use glib;
|
||||
|
|
|
@ -422,7 +422,7 @@ impl UniqueAdapter {
|
|||
#[derive(Debug)]
|
||||
pub struct UniqueAdapterMap<'a>(&'a UniqueAdapter, &'a [u8]);
|
||||
|
||||
impl<'a> Drop for UniqueAdapterMap<'a> {
|
||||
impl Drop for UniqueAdapterMap<'_> {
|
||||
#[inline]
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
|
@ -431,7 +431,7 @@ impl<'a> Drop for UniqueAdapterMap<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ops::Deref for UniqueAdapterMap<'a> {
|
||||
impl ops::Deref for UniqueAdapterMap<'_> {
|
||||
type Target = [u8];
|
||||
|
||||
#[inline]
|
||||
|
@ -440,7 +440,7 @@ impl<'a> ops::Deref for UniqueAdapterMap<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> AsRef<[u8]> for UniqueAdapterMap<'a> {
|
||||
impl AsRef<[u8]> for UniqueAdapterMap<'_> {
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &[u8] {
|
||||
self.1
|
||||
|
|
|
@ -11,8 +11,8 @@ pub struct BaseParseFrame<'a>(
|
|||
PhantomData<&'a BaseParse>,
|
||||
);
|
||||
|
||||
unsafe impl<'a> Send for BaseParseFrame<'a> {}
|
||||
unsafe impl<'a> Sync for BaseParseFrame<'a> {}
|
||||
unsafe impl Send for BaseParseFrame<'_> {}
|
||||
unsafe impl Sync for BaseParseFrame<'_> {}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Overhead {
|
||||
|
@ -53,7 +53,7 @@ impl<'a> ::glib::translate::ToGlibPtr<'a, *mut ffi::GstBaseParseFrame> for BaseP
|
|||
type Storage = PhantomData<&'a Self>;
|
||||
|
||||
#[inline]
|
||||
fn to_glib_none(&'a self) -> ::glib::translate::Stash<*mut ffi::GstBaseParseFrame, Self> {
|
||||
fn to_glib_none(&'a self) -> ::glib::translate::Stash<'a, *mut ffi::GstBaseParseFrame, Self> {
|
||||
Stash(self.0.as_ptr(), PhantomData)
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ impl<'a> ::glib::translate::ToGlibPtr<'a, *mut ffi::GstBaseParseFrame> for BaseP
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> fmt::Debug for BaseParseFrame<'a> {
|
||||
impl fmt::Debug for BaseParseFrame<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let mut b = f.debug_struct("BaseParseFrame");
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use glib;
|
||||
|
|
|
@ -813,7 +813,7 @@ impl Harness {
|
|||
#[derive(Debug)]
|
||||
pub struct Ref<'a>(&'a Harness);
|
||||
|
||||
impl<'a> ops::Deref for Ref<'a> {
|
||||
impl ops::Deref for Ref<'_> {
|
||||
type Target = Harness;
|
||||
|
||||
#[inline]
|
||||
|
@ -825,7 +825,7 @@ impl<'a> ops::Deref for Ref<'a> {
|
|||
#[derive(Debug)]
|
||||
pub struct RefMut<'a>(&'a mut Harness);
|
||||
|
||||
impl<'a> ops::Deref for RefMut<'a> {
|
||||
impl ops::Deref for RefMut<'_> {
|
||||
type Target = Harness;
|
||||
|
||||
#[inline]
|
||||
|
@ -834,7 +834,7 @@ impl<'a> ops::Deref for RefMut<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ops::DerefMut for RefMut<'a> {
|
||||
impl ops::DerefMut for RefMut<'_> {
|
||||
#[inline]
|
||||
fn deref_mut(&mut self) -> &mut Harness {
|
||||
self.0
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use glib;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use glib;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
use std::sync::Once;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
|
||||
pub use gst_gl;
|
||||
pub use gstreamer_gl_egl_sys as ffi;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use glib;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
|
||||
pub use gst_gl;
|
||||
pub use gstreamer_gl_wayland_sys as ffi;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
|
||||
pub use gst_gl;
|
||||
pub use gstreamer_gl_x11_sys as ffi;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
|
||||
use std::sync::Once;
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use gio;
|
||||
|
|
|
@ -51,7 +51,7 @@ unsafe extern "C" fn notify_timeout_trampoline<P, F: Fn(&P) + Send + Sync + 'sta
|
|||
|
||||
pub struct DebugInfo<'a>(&'a DiscovererInfo);
|
||||
|
||||
impl<'a> fmt::Debug for DebugInfo<'a> {
|
||||
impl fmt::Debug for DebugInfo<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let stream_info = self.0.stream_info();
|
||||
let stream_list = self.0.stream_list();
|
||||
|
|
|
@ -8,7 +8,7 @@ use crate::{DiscovererAudioInfo, DiscovererStreamInfo};
|
|||
|
||||
pub struct Debug<'a>(&'a DiscovererAudioInfo);
|
||||
|
||||
impl<'a> fmt::Debug for Debug<'a> {
|
||||
impl fmt::Debug for Debug<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let info = self.0.upcast_ref::<DiscovererStreamInfo>();
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ use crate::{prelude::*, DiscovererContainerInfo};
|
|||
|
||||
pub struct Debug<'a>(&'a DiscovererContainerInfo);
|
||||
|
||||
impl<'a> fmt::Debug for Debug<'a> {
|
||||
impl fmt::Debug for Debug<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let streams = self.0.streams();
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ impl<O: IsA<DiscovererStreamInfo>> DiscovererStreamInfoExtManual for O {}
|
|||
|
||||
pub struct Debug<'a>(&'a DiscovererStreamInfo);
|
||||
|
||||
impl<'a> fmt::Debug for Debug<'a> {
|
||||
impl fmt::Debug for Debug<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let mut d = f.debug_struct("DiscovererStreamInfo");
|
||||
d.field("caps", &self.0.caps())
|
||||
|
|
|
@ -8,7 +8,7 @@ use crate::{DiscovererStreamInfo, DiscovererSubtitleInfo};
|
|||
|
||||
pub struct Debug<'a>(&'a DiscovererSubtitleInfo);
|
||||
|
||||
impl<'a> fmt::Debug for Debug<'a> {
|
||||
impl fmt::Debug for Debug<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let info = self.0.upcast_ref::<DiscovererStreamInfo>();
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ impl DiscovererVideoInfo {
|
|||
|
||||
pub struct Debug<'a>(&'a DiscovererVideoInfo);
|
||||
|
||||
impl<'a> fmt::Debug for Debug<'a> {
|
||||
impl fmt::Debug for Debug<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let info = self.0.upcast_ref::<DiscovererStreamInfo>();
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@ use glib::translate::*;
|
|||
|
||||
pub unsafe trait CodecTag<'a>: gst::Tag<'a, TagType = &'a str> {}
|
||||
|
||||
unsafe impl<'a> CodecTag<'a> for gst::tags::ContainerFormat {}
|
||||
unsafe impl<'a> CodecTag<'a> for gst::tags::AudioCodec {}
|
||||
unsafe impl<'a> CodecTag<'a> for gst::tags::VideoCodec {}
|
||||
unsafe impl<'a> CodecTag<'a> for gst::tags::SubtitleCodec {}
|
||||
unsafe impl<'a> CodecTag<'a> for gst::tags::Codec {}
|
||||
unsafe impl CodecTag<'_> for gst::tags::ContainerFormat {}
|
||||
unsafe impl CodecTag<'_> for gst::tags::AudioCodec {}
|
||||
unsafe impl CodecTag<'_> for gst::tags::VideoCodec {}
|
||||
unsafe impl CodecTag<'_> for gst::tags::SubtitleCodec {}
|
||||
unsafe impl CodecTag<'_> for gst::tags::Codec {}
|
||||
|
||||
pub fn pb_utils_add_codec_description_to_tag_list_for_tag<'a, T: CodecTag<'a>>(
|
||||
taglist: &mut gst::TagListRef,
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
use std::sync::Once;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use gst;
|
||||
|
|
|
@ -339,7 +339,7 @@ impl std::fmt::Debug for Other {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> PlayMessage<'a> {
|
||||
impl PlayMessage<'_> {
|
||||
#[doc(alias = "gst_play_message_parse_uri_loaded")]
|
||||
#[doc(alias = "gst_play_message_parse_position_updated")]
|
||||
#[doc(alias = "gst_play_message_parse_duration_updated")]
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use gst;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use glib;
|
||||
|
|
|
@ -13,10 +13,10 @@ pub struct RTPBuffer<'a, T> {
|
|||
phantom: PhantomData<&'a T>,
|
||||
}
|
||||
|
||||
unsafe impl<'a, T> Send for RTPBuffer<'a, T> {}
|
||||
unsafe impl<'a, T> Sync for RTPBuffer<'a, T> {}
|
||||
unsafe impl<T> Send for RTPBuffer<'_, T> {}
|
||||
unsafe impl<T> Sync for RTPBuffer<'_, T> {}
|
||||
|
||||
impl<'a, T> fmt::Debug for RTPBuffer<'a, T> {
|
||||
impl<T> fmt::Debug for RTPBuffer<'_, T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_struct("RTPBuffer")
|
||||
.field("rtp_buffer", &self.rtp_buffer)
|
||||
|
@ -28,7 +28,7 @@ impl<'a> RTPBuffer<'a, Readable> {
|
|||
#[inline]
|
||||
pub fn from_buffer_readable(
|
||||
buffer: &'a gst::BufferRef,
|
||||
) -> Result<RTPBuffer<Readable>, glib::BoolError> {
|
||||
) -> Result<RTPBuffer<'a, Readable>, glib::BoolError> {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
let mut rtp_buffer = mem::MaybeUninit::zeroed();
|
||||
|
@ -64,7 +64,7 @@ impl<'a> RTPBuffer<'a, Writable> {
|
|||
#[inline]
|
||||
pub fn from_buffer_writable(
|
||||
buffer: &'a mut gst::BufferRef,
|
||||
) -> Result<RTPBuffer<Writable>, glib::BoolError> {
|
||||
) -> Result<RTPBuffer<'a, Writable>, glib::BoolError> {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
let mut rtp_buffer = mem::MaybeUninit::zeroed();
|
||||
|
@ -202,7 +202,7 @@ impl<'a> RTPBuffer<'a, Writable> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> RTPBuffer<'a, T> {
|
||||
impl<T> RTPBuffer<'_, T> {
|
||||
#[doc(alias = "get_seq")]
|
||||
#[doc(alias = "gst_rtp_buffer_get_seq")]
|
||||
pub fn seq(&self) -> u16 {
|
||||
|
@ -429,7 +429,7 @@ impl<'a, T> RTPBuffer<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> Drop for RTPBuffer<'a, T> {
|
||||
impl<T> Drop for RTPBuffer<'_, T> {
|
||||
#[inline]
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use gio;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use glib;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use glib;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use glib;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use gstreamer_validate_sys as ffi;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use glib;
|
||||
|
|
|
@ -91,7 +91,7 @@ impl<'a> ToGlibPtr<'a, *const ffi::GstVideoAlignment> for VideoAlignment {
|
|||
type Storage = PhantomData<&'a Self>;
|
||||
|
||||
#[inline]
|
||||
fn to_glib_none(&'a self) -> Stash<*const ffi::GstVideoAlignment, Self> {
|
||||
fn to_glib_none(&'a self) -> Stash<'a, *const ffi::GstVideoAlignment, Self> {
|
||||
Stash(&self.0, PhantomData)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ impl<'a> ::glib::translate::ToGlibPtr<'a, *mut ffi::GstVideoCodecFrame> for Vide
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> fmt::Debug for VideoCodecFrame<'a> {
|
||||
impl fmt::Debug for VideoCodecFrame<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let mut b = f.debug_struct("VideoCodecFrame");
|
||||
|
||||
|
@ -235,7 +235,7 @@ impl<'a> VideoCodecFrame<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> IntoGlibPtr<*mut ffi::GstVideoCodecFrame> for VideoCodecFrame<'a> {
|
||||
impl IntoGlibPtr<*mut ffi::GstVideoCodecFrame> for VideoCodecFrame<'_> {
|
||||
#[inline]
|
||||
unsafe fn into_glib_ptr(self) -> *mut ffi::GstVideoCodecFrame {
|
||||
let stream_lock = self.element.stream_lock();
|
||||
|
@ -246,7 +246,7 @@ impl<'a> IntoGlibPtr<*mut ffi::GstVideoCodecFrame> for VideoCodecFrame<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> Drop for VideoCodecFrame<'a> {
|
||||
impl Drop for VideoCodecFrame<'_> {
|
||||
#[inline]
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
|
|
|
@ -61,7 +61,7 @@ impl<'a, T: VideoCodecStateContext<'a>> fmt::Debug for VideoCodecState<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> VideoCodecState<'a, Readable> {
|
||||
impl VideoCodecState<'_, Readable> {
|
||||
// Take ownership of @state
|
||||
#[inline]
|
||||
pub(crate) unsafe fn new(state: *mut ffi::GstVideoCodecState) -> Self {
|
||||
|
@ -238,7 +238,7 @@ impl<'a> VideoCodecState<'a, InNegotiation<'a>> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> Clone for VideoCodecState<'a, Readable> {
|
||||
impl Clone for VideoCodecState<'_, Readable> {
|
||||
#[inline]
|
||||
fn clone(&self) -> Self {
|
||||
unsafe {
|
||||
|
@ -248,5 +248,5 @@ impl<'a> Clone for VideoCodecState<'a, Readable> {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl<'a> Send for VideoCodecState<'a, Readable> {}
|
||||
unsafe impl<'a> Sync for VideoCodecState<'a, Readable> {}
|
||||
unsafe impl Send for VideoCodecState<'_, Readable> {}
|
||||
unsafe impl Sync for VideoCodecState<'_, Readable> {}
|
||||
|
|
|
@ -431,7 +431,7 @@ impl<'a> Iterator for ParamsIter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> std::iter::FusedIterator for ParamsIter<'a> {}
|
||||
impl std::iter::FusedIterator for ParamsIter<'_> {}
|
||||
|
||||
unsafe impl MetaAPI for VideoRegionOfInterestMeta {
|
||||
type GstType = ffi::GstVideoRegionOfInterestMeta;
|
||||
|
|
|
@ -460,7 +460,7 @@ pub struct Iter<'a> {
|
|||
len: usize,
|
||||
}
|
||||
|
||||
impl<'a> Iterator for Iter<'a> {
|
||||
impl Iterator for Iter<'_> {
|
||||
type Item = VideoOverlayRectangle;
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
|
@ -504,7 +504,7 @@ impl<'a> Iterator for Iter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> DoubleEndedIterator for Iter<'a> {
|
||||
impl DoubleEndedIterator for Iter<'_> {
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
if self.idx == self.len {
|
||||
return None;
|
||||
|
@ -527,6 +527,6 @@ impl<'a> DoubleEndedIterator for Iter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ExactSizeIterator for Iter<'a> {}
|
||||
impl ExactSizeIterator for Iter<'_> {}
|
||||
|
||||
impl<'a> std::iter::FusedIterator for Iter<'a> {}
|
||||
impl std::iter::FusedIterator for Iter<'_> {}
|
||||
|
|
|
@ -67,7 +67,7 @@ impl<'a> glib::translate::ToGlibPtrMut<'a, *mut ffi::GstVideoRectangle> for Vide
|
|||
#[inline]
|
||||
fn to_glib_none_mut(
|
||||
&'a mut self,
|
||||
) -> glib::translate::StashMut<*mut ffi::GstVideoRectangle, Self> {
|
||||
) -> glib::translate::StashMut<'a, *mut ffi::GstVideoRectangle, Self> {
|
||||
glib::translate::StashMut(self as *mut _ as *mut _, PhantomData)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -157,7 +157,7 @@ pub struct AncillaryIter<'a> {
|
|||
parser: &'a mut VideoVBIParser,
|
||||
}
|
||||
|
||||
impl<'a> Iterator for AncillaryIter<'a> {
|
||||
impl Iterator for AncillaryIter<'_> {
|
||||
type Item = Result<VideoAncillary, VideoVBIError>;
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
pub use glib;
|
||||
|
|
|
@ -1238,7 +1238,7 @@ impl PartialEq for BufferRef {
|
|||
|
||||
impl Eq for BufferRef {}
|
||||
|
||||
impl<'a, T> BufferMap<'a, T> {
|
||||
impl<T> BufferMap<'_, T> {
|
||||
#[doc(alias = "get_size")]
|
||||
#[inline]
|
||||
pub fn size(&self) -> usize {
|
||||
|
@ -1260,7 +1260,7 @@ impl<'a, T> BufferMap<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> BufferMap<'a, Writable> {
|
||||
impl BufferMap<'_, Writable> {
|
||||
#[inline]
|
||||
pub fn as_mut_slice(&mut self) -> &mut [u8] {
|
||||
if self.map_info.size == 0 {
|
||||
|
@ -1270,21 +1270,21 @@ impl<'a> BufferMap<'a, Writable> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> AsRef<[u8]> for BufferMap<'a, T> {
|
||||
impl<T> AsRef<[u8]> for BufferMap<'_, T> {
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &[u8] {
|
||||
self.as_slice()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> AsMut<[u8]> for BufferMap<'a, Writable> {
|
||||
impl AsMut<[u8]> for BufferMap<'_, Writable> {
|
||||
#[inline]
|
||||
fn as_mut(&mut self) -> &mut [u8] {
|
||||
self.as_mut_slice()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> ops::Deref for BufferMap<'a, T> {
|
||||
impl<T> ops::Deref for BufferMap<'_, T> {
|
||||
type Target = [u8];
|
||||
|
||||
#[inline]
|
||||
|
@ -1293,14 +1293,14 @@ impl<'a, T> ops::Deref for BufferMap<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ops::DerefMut for BufferMap<'a, Writable> {
|
||||
impl ops::DerefMut for BufferMap<'_, Writable> {
|
||||
#[inline]
|
||||
fn deref_mut(&mut self) -> &mut [u8] {
|
||||
self.as_mut_slice()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> fmt::Debug for BufferMap<'a, T> {
|
||||
impl<T> fmt::Debug for BufferMap<'_, T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_tuple("BufferMap").field(&self.buffer()).finish()
|
||||
}
|
||||
|
@ -1312,9 +1312,9 @@ impl<'a, T> PartialEq for BufferMap<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> Eq for BufferMap<'a, T> {}
|
||||
impl<T> Eq for BufferMap<'_, T> {}
|
||||
|
||||
impl<'a, T> Drop for BufferMap<'a, T> {
|
||||
impl<T> Drop for BufferMap<'_, T> {
|
||||
#[inline]
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
|
@ -1323,8 +1323,8 @@ impl<'a, T> Drop for BufferMap<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl<'a, T> Send for BufferMap<'a, T> {}
|
||||
unsafe impl<'a, T> Sync for BufferMap<'a, T> {}
|
||||
unsafe impl<T> Send for BufferMap<'_, T> {}
|
||||
unsafe impl<T> Sync for BufferMap<'_, T> {}
|
||||
|
||||
impl<T> MappedBuffer<T> {
|
||||
#[inline]
|
||||
|
@ -1455,7 +1455,7 @@ struct BufferChunked16Iter<'a> {
|
|||
len: usize,
|
||||
}
|
||||
|
||||
impl<'a> Iterator for BufferChunked16Iter<'a> {
|
||||
impl Iterator for BufferChunked16Iter<'_> {
|
||||
// FIXME: Return a `&'self [u8]` once there's some GAT iterator trait
|
||||
type Item = ([u8; 16], usize);
|
||||
|
||||
|
@ -1493,7 +1493,7 @@ impl<'a> Iterator for BufferChunked16Iter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> Dump<'a> {
|
||||
impl Dump<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter, debug: bool) -> fmt::Result {
|
||||
let n_memory = self.buffer.n_memory();
|
||||
if n_memory == 0 {
|
||||
|
@ -1617,13 +1617,13 @@ impl<'a> Dump<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> fmt::Display for Dump<'a> {
|
||||
impl fmt::Display for Dump<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
self.fmt(f, false)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> fmt::Debug for Dump<'a> {
|
||||
impl fmt::Debug for Dump<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
self.fmt(f, true)
|
||||
}
|
||||
|
|
|
@ -343,19 +343,19 @@ impl<T> Drop for BufferRefCursor<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> io::Read for BufferRefCursor<&'a BufferRef> {
|
||||
impl io::Read for BufferRefCursor<&BufferRef> {
|
||||
define_read_impl!(|s| s.buffer);
|
||||
}
|
||||
|
||||
impl<'a> io::Write for BufferRefCursor<&'a mut BufferRef> {
|
||||
impl io::Write for BufferRefCursor<&mut BufferRef> {
|
||||
define_write_impl!(|s| s.buffer);
|
||||
}
|
||||
|
||||
impl<'a> io::Seek for BufferRefCursor<&'a BufferRef> {
|
||||
impl io::Seek for BufferRefCursor<&BufferRef> {
|
||||
define_seek_impl!(|s| s.buffer);
|
||||
}
|
||||
|
||||
impl<'a> io::Seek for BufferRefCursor<&'a mut BufferRef> {
|
||||
impl io::Seek for BufferRefCursor<&mut BufferRef> {
|
||||
define_seek_impl!(|s| s.buffer);
|
||||
}
|
||||
|
||||
|
|
|
@ -326,7 +326,7 @@ pub struct Iter<'a> {
|
|||
timeout: Option<crate::ClockTime>,
|
||||
}
|
||||
|
||||
impl<'a> Iterator for Iter<'a> {
|
||||
impl Iterator for Iter<'_> {
|
||||
type Item = Message;
|
||||
|
||||
fn next(&mut self) -> Option<Message> {
|
||||
|
|
|
@ -1308,7 +1308,7 @@ impl fmt::Debug for CapsRef {
|
|||
structure: &'a StructureRef,
|
||||
}
|
||||
|
||||
impl<'a> fmt::Debug for WithFeatures<'a> {
|
||||
impl fmt::Debug for WithFeatures<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let name = format!("{}({})", self.structure.name(), self.features);
|
||||
let mut debug = f.debug_struct(&name);
|
||||
|
|
|
@ -239,7 +239,7 @@ impl<'a> ToGlibPtrMut<'a, *mut ffi::GstCapsFeatures> for CapsFeatures {
|
|||
type Storage = PhantomData<&'a mut Self>;
|
||||
|
||||
#[inline]
|
||||
fn to_glib_none_mut(&'a mut self) -> StashMut<*mut ffi::GstCapsFeatures, Self> {
|
||||
fn to_glib_none_mut(&'a mut self) -> StashMut<'a, *mut ffi::GstCapsFeatures, Self> {
|
||||
unsafe { StashMut(self.0.as_mut(), PhantomData) }
|
||||
}
|
||||
}
|
||||
|
@ -744,7 +744,7 @@ impl<'a> Iterator for Iter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> DoubleEndedIterator for Iter<'a> {
|
||||
impl DoubleEndedIterator for Iter<'_> {
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
if self.idx == self.n_features {
|
||||
return None;
|
||||
|
@ -785,9 +785,9 @@ impl<'a> DoubleEndedIterator for Iter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ExactSizeIterator for Iter<'a> {}
|
||||
impl ExactSizeIterator for Iter<'_> {}
|
||||
|
||||
impl<'a> std::iter::FusedIterator for Iter<'a> {}
|
||||
impl std::iter::FusedIterator for Iter<'_> {}
|
||||
|
||||
impl<'a> IntoIterator for &'a CapsFeaturesRef {
|
||||
type IntoIter = Iter<'a>;
|
||||
|
|
|
@ -26,7 +26,7 @@ const CAPS_FEATURES_VARIANT_NAMES: &[&str] = &[
|
|||
];
|
||||
|
||||
struct CapsFeaturesForIterSe<'a>(&'a CapsFeaturesRef);
|
||||
impl<'a> Serialize for CapsFeaturesForIterSe<'a> {
|
||||
impl Serialize for CapsFeaturesForIterSe<'_> {
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
let iter = self.0.iter();
|
||||
let size = iter.size_hint().0;
|
||||
|
@ -95,7 +95,7 @@ impl<'de> Deserialize<'de> for CapsFeaturesSome {
|
|||
}
|
||||
|
||||
struct CapsFeaturesVariantKindsVisitor;
|
||||
impl<'de> Visitor<'de> for CapsFeaturesVariantKindsVisitor {
|
||||
impl Visitor<'_> for CapsFeaturesVariantKindsVisitor {
|
||||
type Value = CapsFeaturesVariantKinds;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
|
|
|
@ -30,7 +30,7 @@ const CAPS_VARIANT_NAMES: &[&str] = &[
|
|||
];
|
||||
|
||||
struct CapsItemSe<'a>(&'a StructureRef, Option<&'a CapsFeaturesRef>);
|
||||
impl<'a> Serialize for CapsItemSe<'a> {
|
||||
impl Serialize for CapsItemSe<'_> {
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
let mut tup = serializer.serialize_tuple(2)?;
|
||||
tup.serialize_element(self.0)?;
|
||||
|
@ -40,7 +40,7 @@ impl<'a> Serialize for CapsItemSe<'a> {
|
|||
}
|
||||
|
||||
struct CapsForIterSe<'a>(&'a CapsRef);
|
||||
impl<'a> Serialize for CapsForIterSe<'a> {
|
||||
impl Serialize for CapsForIterSe<'_> {
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
let iter = self.0.iter_with_features();
|
||||
let size = iter.size_hint().0;
|
||||
|
@ -154,7 +154,7 @@ impl<'de> Deserialize<'de> for CapsSome {
|
|||
}
|
||||
|
||||
struct CapsVariantKindsVisitor;
|
||||
impl<'de> Visitor<'de> for CapsVariantKindsVisitor {
|
||||
impl Visitor<'_> for CapsVariantKindsVisitor {
|
||||
type Value = CapsVariantKinds;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
|
|
|
@ -737,7 +737,7 @@ impl glib::value::ValueType for MessageType {
|
|||
type Type = Self;
|
||||
}
|
||||
|
||||
unsafe impl<'a> FromValue<'a> for MessageType {
|
||||
unsafe impl FromValue<'_> for MessageType {
|
||||
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
||||
|
||||
#[inline]
|
||||
|
|
|
@ -475,7 +475,7 @@ unsafe impl glib::value::ValueTypeChecker for ClockTimeValueTypeOrNoneChecker {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl<'a> glib::value::FromValue<'a> for ClockTime {
|
||||
unsafe impl glib::value::FromValue<'_> for ClockTime {
|
||||
type Checker = ClockTimeValueTypeOrNoneChecker;
|
||||
|
||||
#[inline]
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![allow(clippy::manual_range_contains)]
|
||||
#![allow(clippy::manual_c_str_literals)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
// Re-exported for the subclass gst_plugin_define! macro
|
||||
|
|
|
@ -352,7 +352,7 @@ impl MemoryRef {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> MemoryMap<'a, T> {
|
||||
impl<T> MemoryMap<'_, T> {
|
||||
#[doc(alias = "get_size")]
|
||||
#[inline]
|
||||
pub fn size(&self) -> usize {
|
||||
|
@ -374,7 +374,7 @@ impl<'a, T> MemoryMap<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> MemoryMap<'a, Writable> {
|
||||
impl MemoryMap<'_, Writable> {
|
||||
#[inline]
|
||||
pub fn as_mut_slice(&mut self) -> &mut [u8] {
|
||||
if self.map_info.size == 0 {
|
||||
|
@ -384,21 +384,21 @@ impl<'a> MemoryMap<'a, Writable> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> AsRef<[u8]> for MemoryMap<'a, T> {
|
||||
impl<T> AsRef<[u8]> for MemoryMap<'_, T> {
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &[u8] {
|
||||
self.as_slice()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> AsMut<[u8]> for MemoryMap<'a, Writable> {
|
||||
impl AsMut<[u8]> for MemoryMap<'_, Writable> {
|
||||
#[inline]
|
||||
fn as_mut(&mut self) -> &mut [u8] {
|
||||
self.as_mut_slice()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> Deref for MemoryMap<'a, T> {
|
||||
impl<T> Deref for MemoryMap<'_, T> {
|
||||
type Target = [u8];
|
||||
|
||||
#[inline]
|
||||
|
@ -407,14 +407,14 @@ impl<'a, T> Deref for MemoryMap<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> DerefMut for MemoryMap<'a, Writable> {
|
||||
impl DerefMut for MemoryMap<'_, Writable> {
|
||||
#[inline]
|
||||
fn deref_mut(&mut self) -> &mut [u8] {
|
||||
self.as_mut_slice()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> fmt::Debug for MemoryMap<'a, T> {
|
||||
impl<T> fmt::Debug for MemoryMap<'_, T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_tuple("MemoryMap").field(&self.memory()).finish()
|
||||
}
|
||||
|
@ -426,9 +426,9 @@ impl<'a, T> PartialEq for MemoryMap<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> Eq for MemoryMap<'a, T> {}
|
||||
impl<T> Eq for MemoryMap<'_, T> {}
|
||||
|
||||
impl<'a, T> Drop for MemoryMap<'a, T> {
|
||||
impl<T> Drop for MemoryMap<'_, T> {
|
||||
#[inline]
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
|
@ -437,8 +437,8 @@ impl<'a, T> Drop for MemoryMap<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl<'a, T> Send for MemoryMap<'a, T> {}
|
||||
unsafe impl<'a, T> Sync for MemoryMap<'a, T> {}
|
||||
unsafe impl<T> Send for MemoryMap<'_, T> {}
|
||||
unsafe impl<T> Sync for MemoryMap<'_, T> {}
|
||||
|
||||
impl<T> MappedMemory<T> {
|
||||
#[inline]
|
||||
|
@ -545,7 +545,7 @@ pub struct Dump<'a> {
|
|||
end: Bound<usize>,
|
||||
}
|
||||
|
||||
impl<'a> Dump<'a> {
|
||||
impl Dump<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter, debug: bool) -> fmt::Result {
|
||||
let map = self.memory.map_readable().expect("Failed to map memory");
|
||||
let data = map.as_slice();
|
||||
|
@ -564,13 +564,13 @@ impl<'a> Dump<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> fmt::Display for Dump<'a> {
|
||||
impl fmt::Display for Dump<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
self.fmt(f, false)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> fmt::Debug for Dump<'a> {
|
||||
impl fmt::Debug for Dump<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
self.fmt(f, true)
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ impl<'a, T: fmt::Debug + 'a, U> fmt::Debug for MetaRefMut<'a, T, U> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> ops::Deref for MetaRef<'a, T> {
|
||||
impl<T> ops::Deref for MetaRef<'_, T> {
|
||||
type Target = T;
|
||||
|
||||
#[inline]
|
||||
|
@ -118,7 +118,7 @@ impl<'a, T> AsRef<MetaRef<'a, T>> for MetaRef<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> AsRef<T> for MetaRef<'a, T> {
|
||||
impl<T> AsRef<T> for MetaRef<'_, T> {
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &T {
|
||||
self.meta
|
||||
|
@ -134,7 +134,7 @@ impl<'a, T: 'a> Clone for MetaRef<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T, U> ops::Deref for MetaRefMut<'a, T, U> {
|
||||
impl<T, U> ops::Deref for MetaRefMut<'_, T, U> {
|
||||
type Target = T;
|
||||
|
||||
#[inline]
|
||||
|
@ -143,7 +143,7 @@ impl<'a, T, U> ops::Deref for MetaRefMut<'a, T, U> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T, U> ops::DerefMut for MetaRefMut<'a, T, U> {
|
||||
impl<T, U> ops::DerefMut for MetaRefMut<'_, T, U> {
|
||||
#[inline]
|
||||
fn deref_mut(&mut self) -> &mut T {
|
||||
self.meta
|
||||
|
@ -157,7 +157,7 @@ impl<'a, T, U> AsRef<MetaRef<'a, T>> for MetaRefMut<'a, T, U> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T, U> AsMut<T> for MetaRefMut<'a, T, U> {
|
||||
impl<T, U> AsMut<T> for MetaRefMut<'_, T, U> {
|
||||
#[inline]
|
||||
fn as_mut(&mut self) -> &mut T {
|
||||
self.meta
|
||||
|
@ -531,7 +531,7 @@ impl<'a, T, U> MetaRefMut<'a, T, U> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> MetaRefMut<'a, T, Standalone> {
|
||||
impl<T> MetaRefMut<'_, T, Standalone> {
|
||||
#[doc(alias = "gst_buffer_remove_meta")]
|
||||
pub fn remove(self) -> Result<(), glib::BoolError> {
|
||||
if self.flags().contains(crate::MetaFlags::LOCKED) {
|
||||
|
@ -1088,7 +1088,7 @@ impl MetaTransformCopy {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl<'a> MetaTransform<'a> for MetaTransformCopy {
|
||||
unsafe impl MetaTransform<'_> for MetaTransformCopy {
|
||||
type GLibType = ffi::GstMetaTransformCopy;
|
||||
|
||||
fn quark() -> glib::Quark {
|
||||
|
|
|
@ -209,7 +209,7 @@ macro_rules! mini_object_wrapper (
|
|||
type Storage = std::marker::PhantomData<&'a mut Self>;
|
||||
|
||||
#[inline]
|
||||
fn to_glib_none_mut(&'a mut self) -> $crate::glib::translate::StashMut<*mut $ffi_name, Self> {
|
||||
fn to_glib_none_mut(&'_ mut self) -> $crate::glib::translate::StashMut<*mut $ffi_name, Self> {
|
||||
self.make_mut();
|
||||
$crate::glib::translate::StashMut(self.as_mut_ptr(), std::marker::PhantomData)
|
||||
}
|
||||
|
|
|
@ -74,7 +74,6 @@ pub trait GstObjectExtManual: IsA<Object> + 'static {
|
|||
|
||||
#[doc(alias = "get_g_value_array")]
|
||||
#[doc(alias = "gst_object_get_g_value_array")]
|
||||
|
||||
fn g_value_array(
|
||||
&self,
|
||||
property_name: &str,
|
||||
|
|
|
@ -57,7 +57,7 @@ pub struct PadProbeInfo<'a> {
|
|||
pub flow_res: Result<FlowSuccess, FlowError>,
|
||||
}
|
||||
|
||||
impl<'a> PadProbeInfo<'a> {
|
||||
impl PadProbeInfo<'_> {
|
||||
pub fn buffer(&self) -> Option<&Buffer> {
|
||||
match self.data {
|
||||
Some(PadProbeData::Buffer(ref buffer)) => Some(buffer),
|
||||
|
@ -166,13 +166,13 @@ pub enum PadProbeData<'a> {
|
|||
__Unknown(*mut ffi::GstMiniObject),
|
||||
}
|
||||
|
||||
unsafe impl<'a> Send for PadProbeData<'a> {}
|
||||
unsafe impl<'a> Sync for PadProbeData<'a> {}
|
||||
unsafe impl Send for PadProbeData<'_> {}
|
||||
unsafe impl Sync for PadProbeData<'_> {}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[must_use = "if unused the StreamLock will immediately unlock"]
|
||||
pub struct StreamLock<'a>(&'a Pad);
|
||||
impl<'a> Drop for StreamLock<'a> {
|
||||
impl Drop for StreamLock<'_> {
|
||||
#[inline]
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
|
|
|
@ -111,6 +111,7 @@ pub struct PadTemplateBuilder<'a> {
|
|||
documentation_caps: Option<&'a Caps>,
|
||||
}
|
||||
|
||||
#[allow(clippy::needless_lifetimes)]
|
||||
impl<'a> PadTemplateBuilder<'a> {
|
||||
pub fn gtype(self, gtype: glib::Type) -> Self {
|
||||
PadTemplateBuilder {
|
||||
|
|
|
@ -33,7 +33,7 @@ impl HasParamSpec for crate::Fraction {
|
|||
type ParamSpec = ParamSpecFraction;
|
||||
|
||||
type SetValue = crate::Fraction;
|
||||
type BuilderFn = for<'a> fn(&'a str) -> ParamSpecFractionBuilder;
|
||||
type BuilderFn = for<'a> fn(&'a str) -> ParamSpecFractionBuilder<'a>;
|
||||
|
||||
fn param_spec_builder() -> Self::BuilderFn {
|
||||
ParamSpecFraction::builder
|
||||
|
@ -229,7 +229,7 @@ impl HasParamSpec for crate::Array {
|
|||
type ParamSpec = ParamSpecArray;
|
||||
|
||||
type SetValue = crate::Array;
|
||||
type BuilderFn = for<'a> fn(&'a str) -> ParamSpecArrayBuilder;
|
||||
type BuilderFn = for<'a> fn(&'a str) -> ParamSpecArrayBuilder<'a>;
|
||||
|
||||
fn param_spec_builder() -> Self::BuilderFn {
|
||||
ParamSpecArray::builder
|
||||
|
|
|
@ -12,7 +12,7 @@ pub trait ByteSliceExt {
|
|||
fn dump_range(&self, range: impl RangeBounds<usize>) -> Dump;
|
||||
}
|
||||
|
||||
impl<'a> ByteSliceExt for &'a [u8] {
|
||||
impl ByteSliceExt for &[u8] {
|
||||
fn dump(&self) -> Dump {
|
||||
self.dump_range(..)
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ impl<'a> ByteSliceExt for &'a [u8] {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ByteSliceExt for &'a mut [u8] {
|
||||
impl ByteSliceExt for &mut [u8] {
|
||||
fn dump(&self) -> Dump {
|
||||
self.dump_range(..)
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ pub struct Dump<'a> {
|
|||
pub(crate) end: Bound<usize>,
|
||||
}
|
||||
|
||||
impl<'a> Dump<'a> {
|
||||
impl Dump<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter, debug: bool) -> fmt::Result {
|
||||
use std::fmt::Write;
|
||||
|
||||
|
@ -148,13 +148,13 @@ impl<'a> Dump<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> fmt::Display for Dump<'a> {
|
||||
impl fmt::Display for Dump<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
self.fmt(f, false)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> fmt::Debug for Dump<'a> {
|
||||
impl fmt::Debug for Dump<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
self.fmt(f, true)
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ impl Stream {
|
|||
|
||||
pub struct Debug<'a>(&'a Stream);
|
||||
|
||||
impl<'a> fmt::Debug for Debug<'a> {
|
||||
impl fmt::Debug for Debug<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_struct("Stream")
|
||||
.field("stream_id", &self.0.stream_id())
|
||||
|
|
|
@ -28,7 +28,7 @@ impl<'a> Iter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> Iterator for Iter<'a> {
|
||||
impl Iterator for Iter<'_> {
|
||||
type Item = Stream;
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
|
@ -72,7 +72,7 @@ impl<'a> Iterator for Iter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> DoubleEndedIterator for Iter<'a> {
|
||||
impl DoubleEndedIterator for Iter<'_> {
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
if self.idx == self.size {
|
||||
return None;
|
||||
|
@ -94,9 +94,9 @@ impl<'a> DoubleEndedIterator for Iter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ExactSizeIterator for Iter<'a> {}
|
||||
impl ExactSizeIterator for Iter<'_> {}
|
||||
|
||||
impl<'a> std::iter::FusedIterator for Iter<'a> {}
|
||||
impl std::iter::FusedIterator for Iter<'_> {}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[must_use = "The builder must be built to be used"]
|
||||
|
@ -271,11 +271,11 @@ impl<'a> IntoIterator for &'a StreamCollection {
|
|||
|
||||
pub struct Debug<'a>(&'a StreamCollection);
|
||||
|
||||
impl<'a> fmt::Debug for Debug<'a> {
|
||||
impl fmt::Debug for Debug<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
struct Streams<'a>(&'a StreamCollection);
|
||||
|
||||
impl<'a> fmt::Debug for Streams<'a> {
|
||||
impl fmt::Debug for Streams<'_> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let mut f = f.debug_list();
|
||||
|
||||
|
|
|
@ -340,7 +340,7 @@ impl<'a> ToGlibPtrMut<'a, *mut ffi::GstStructure> for Structure {
|
|||
type Storage = PhantomData<&'a mut Self>;
|
||||
|
||||
#[inline]
|
||||
fn to_glib_none_mut(&'a mut self) -> StashMut<*mut ffi::GstStructure, Self> {
|
||||
fn to_glib_none_mut(&'a mut self) -> StashMut<'a, *mut ffi::GstStructure, Self> {
|
||||
unsafe { StashMut(self.0.as_mut(), PhantomData) }
|
||||
}
|
||||
}
|
||||
|
@ -1796,7 +1796,7 @@ impl<'a> Iterator for FieldIterator<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> DoubleEndedIterator for FieldIterator<'a> {
|
||||
impl DoubleEndedIterator for FieldIterator<'_> {
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
if self.idx == self.n_fields {
|
||||
return None;
|
||||
|
@ -1809,9 +1809,9 @@ impl<'a> DoubleEndedIterator for FieldIterator<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ExactSizeIterator for FieldIterator<'a> {}
|
||||
impl ExactSizeIterator for FieldIterator<'_> {}
|
||||
|
||||
impl<'a> std::iter::FusedIterator for FieldIterator<'a> {}
|
||||
impl std::iter::FusedIterator for FieldIterator<'_> {}
|
||||
|
||||
#[cfg(feature = "v1_26")]
|
||||
#[derive(Debug)]
|
||||
|
@ -1858,7 +1858,7 @@ impl<'a> Iterator for FieldIdIterator<'a> {
|
|||
}
|
||||
|
||||
#[cfg(feature = "v1_26")]
|
||||
impl<'a> DoubleEndedIterator for FieldIdIterator<'a> {
|
||||
impl DoubleEndedIterator for FieldIdIterator<'_> {
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
if self.idx == self.n_fields {
|
||||
return None;
|
||||
|
@ -1872,9 +1872,9 @@ impl<'a> DoubleEndedIterator for FieldIdIterator<'a> {
|
|||
}
|
||||
|
||||
#[cfg(feature = "v1_26")]
|
||||
impl<'a> ExactSizeIterator for FieldIdIterator<'a> {}
|
||||
impl ExactSizeIterator for FieldIdIterator<'_> {}
|
||||
#[cfg(feature = "v1_26")]
|
||||
impl<'a> std::iter::FusedIterator for FieldIdIterator<'a> {}
|
||||
impl std::iter::FusedIterator for FieldIdIterator<'_> {}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Iter<'a> {
|
||||
|
@ -1921,7 +1921,7 @@ impl<'a> Iterator for Iter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> DoubleEndedIterator for Iter<'a> {
|
||||
impl DoubleEndedIterator for Iter<'_> {
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
let f = self.iter.next_back()?;
|
||||
let v = self.iter.structure.value(f);
|
||||
|
@ -1935,9 +1935,9 @@ impl<'a> DoubleEndedIterator for Iter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ExactSizeIterator for Iter<'a> {}
|
||||
impl ExactSizeIterator for Iter<'_> {}
|
||||
|
||||
impl<'a> std::iter::FusedIterator for Iter<'a> {}
|
||||
impl std::iter::FusedIterator for Iter<'_> {}
|
||||
|
||||
#[cfg(feature = "v1_26")]
|
||||
#[derive(Debug)]
|
||||
|
@ -1988,7 +1988,7 @@ impl<'a> Iterator for IdIter<'a> {
|
|||
}
|
||||
|
||||
#[cfg(feature = "v1_26")]
|
||||
impl<'a> DoubleEndedIterator for IdIter<'a> {
|
||||
impl DoubleEndedIterator for IdIter<'_> {
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
let f = self.iter.next_back()?;
|
||||
let v = self.iter.structure.value_by_id(f);
|
||||
|
@ -2003,9 +2003,9 @@ impl<'a> DoubleEndedIterator for IdIter<'a> {
|
|||
}
|
||||
|
||||
#[cfg(feature = "v1_26")]
|
||||
impl<'a> ExactSizeIterator for IdIter<'a> {}
|
||||
impl ExactSizeIterator for IdIter<'_> {}
|
||||
#[cfg(feature = "v1_26")]
|
||||
impl<'a> std::iter::FusedIterator for IdIter<'a> {}
|
||||
impl std::iter::FusedIterator for IdIter<'_> {}
|
||||
|
||||
impl<'a> IntoIterator for &'a StructureRef {
|
||||
type IntoIter = Iter<'a>;
|
||||
|
|
|
@ -17,7 +17,7 @@ use crate::{
|
|||
};
|
||||
|
||||
struct FieldSe<'a>(&'a str, &'a glib::SendValue);
|
||||
impl<'a> Serialize for FieldSe<'a> {
|
||||
impl Serialize for FieldSe<'_> {
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
ser_value!(self.1, |type_, value| {
|
||||
let mut tup = serializer.serialize_tuple(3)?;
|
||||
|
@ -30,7 +30,7 @@ impl<'a> Serialize for FieldSe<'a> {
|
|||
}
|
||||
|
||||
struct StructureForIter<'a>(&'a StructureRef);
|
||||
impl<'a> Serialize for StructureForIter<'a> {
|
||||
impl Serialize for StructureForIter<'_> {
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
let iter = self.0.iter();
|
||||
let size = iter.size_hint().0;
|
||||
|
@ -103,7 +103,7 @@ impl<'de> Deserialize<'de> for FieldDe {
|
|||
struct FieldsDe<'a>(&'a mut StructureRef);
|
||||
|
||||
struct FieldsVisitor<'a>(&'a mut StructureRef);
|
||||
impl<'de, 'a> Visitor<'de> for FieldsVisitor<'a> {
|
||||
impl<'de> Visitor<'de> for FieldsVisitor<'_> {
|
||||
type Value = ();
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
|
@ -120,7 +120,7 @@ impl<'de, 'a> Visitor<'de> for FieldsVisitor<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'de, 'a> DeserializeSeed<'de> for FieldsDe<'a> {
|
||||
impl<'de> DeserializeSeed<'de> for FieldsDe<'_> {
|
||||
type Value = ();
|
||||
|
||||
fn deserialize<D: Deserializer<'de>>(self, deserializer: D) -> Result<(), D::Error> {
|
||||
|
|
|
@ -95,7 +95,7 @@ impl From<FlowError> for FlowReturn {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a FlowError> for FlowReturn {
|
||||
impl From<&FlowError> for FlowReturn {
|
||||
fn from(err: &FlowError) -> FlowReturn {
|
||||
match *err {
|
||||
FlowError::Flushing => FlowReturn::Flushing,
|
||||
|
|
|
@ -811,7 +811,7 @@ impl<'a> Iterator for GenericTagIter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> DoubleEndedIterator for GenericTagIter<'a> {
|
||||
impl DoubleEndedIterator for GenericTagIter<'_> {
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
if self.idx == self.size {
|
||||
return None;
|
||||
|
@ -833,9 +833,9 @@ impl<'a> DoubleEndedIterator for GenericTagIter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ExactSizeIterator for GenericTagIter<'a> {}
|
||||
impl ExactSizeIterator for GenericTagIter<'_> {}
|
||||
|
||||
impl<'a> std::iter::FusedIterator for GenericTagIter<'a> {}
|
||||
impl std::iter::FusedIterator for GenericTagIter<'_> {}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct GenericIter<'a> {
|
||||
|
@ -903,7 +903,7 @@ impl<'a> Iterator for GenericIter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> DoubleEndedIterator for GenericIter<'a> {
|
||||
impl DoubleEndedIterator for GenericIter<'_> {
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
if self.idx == self.size {
|
||||
return None;
|
||||
|
@ -927,9 +927,9 @@ impl<'a> DoubleEndedIterator for GenericIter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ExactSizeIterator for GenericIter<'a> {}
|
||||
impl ExactSizeIterator for GenericIter<'_> {}
|
||||
|
||||
impl<'a> std::iter::FusedIterator for GenericIter<'a> {}
|
||||
impl std::iter::FusedIterator for GenericIter<'_> {}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Iter<'a> {
|
||||
|
@ -997,7 +997,7 @@ impl<'a> Iterator for Iter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> DoubleEndedIterator for Iter<'a> {
|
||||
impl DoubleEndedIterator for Iter<'_> {
|
||||
fn next_back(&mut self) -> Option<Self::Item> {
|
||||
if self.idx == self.size {
|
||||
return None;
|
||||
|
@ -1021,9 +1021,9 @@ impl<'a> DoubleEndedIterator for Iter<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ExactSizeIterator for Iter<'a> {}
|
||||
impl ExactSizeIterator for Iter<'_> {}
|
||||
|
||||
impl<'a> std::iter::FusedIterator for Iter<'a> {}
|
||||
impl std::iter::FusedIterator for Iter<'_> {}
|
||||
|
||||
#[doc(alias = "gst_tag_exists")]
|
||||
pub fn tag_exists(name: impl IntoGStr) -> bool {
|
||||
|
@ -1306,7 +1306,7 @@ mod tests {
|
|||
const TAG_NAME: &'static glib::GStr = glib::gstr!("my-custom-tag");
|
||||
}
|
||||
|
||||
impl<'a> CustomTag<'a> for MyCustomTag {
|
||||
impl CustomTag<'_> for MyCustomTag {
|
||||
const FLAG: crate::TagFlag = crate::TagFlag::Meta;
|
||||
const NICK: &'static glib::GStr = glib::gstr!("my custom tag");
|
||||
const DESCRIPTION: &'static glib::GStr =
|
||||
|
|
|
@ -52,7 +52,7 @@ impl<'a> TagValuesSer<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> Serialize for TagValuesSer<'a> {
|
||||
impl Serialize for TagValuesSer<'_> {
|
||||
#[allow(clippy::redundant_closure_call)]
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
use std::ops::DerefMut;
|
||||
|
@ -102,7 +102,7 @@ impl<'a> TagsSer<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> Serialize for TagsSer<'a> {
|
||||
impl Serialize for TagsSer<'_> {
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
let mut tup = serializer.serialize_tuple(2)?;
|
||||
tup.serialize_element(self.0)?;
|
||||
|
@ -112,7 +112,7 @@ impl<'a> Serialize for TagsSer<'a> {
|
|||
}
|
||||
|
||||
struct TagListSer<'a>(&'a TagListRef);
|
||||
impl<'a> Serialize for TagListSer<'a> {
|
||||
impl Serialize for TagListSer<'_> {
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
let tag_count = self.0.n_tags();
|
||||
match tag_count.cmp(&0) {
|
||||
|
@ -162,7 +162,7 @@ macro_rules! de_opt_tag(
|
|||
struct TagValues<'a>(&'a str, &'a mut TagListRef);
|
||||
|
||||
struct TagValuesVisitor<'a>(&'a str, &'a mut TagListRef);
|
||||
impl<'de, 'a> Visitor<'de> for TagValuesVisitor<'a> {
|
||||
impl<'de> Visitor<'de> for TagValuesVisitor<'_> {
|
||||
type Value = ();
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
|
@ -218,7 +218,7 @@ impl<'de, 'a> Visitor<'de> for TagValuesVisitor<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'de, 'a> DeserializeSeed<'de> for TagValues<'a> {
|
||||
impl<'de> DeserializeSeed<'de> for TagValues<'_> {
|
||||
type Value = ();
|
||||
|
||||
fn deserialize<D: Deserializer<'de>>(self, deserializer: D) -> Result<(), D::Error> {
|
||||
|
@ -230,7 +230,7 @@ impl<'de, 'a> DeserializeSeed<'de> for TagValues<'a> {
|
|||
struct TagValuesTuple<'a>(&'a mut TagListRef);
|
||||
|
||||
struct TagValuesTupleVisitor<'a>(&'a mut TagListRef);
|
||||
impl<'de, 'a> Visitor<'de> for TagValuesTupleVisitor<'a> {
|
||||
impl<'de> Visitor<'de> for TagValuesTupleVisitor<'_> {
|
||||
type Value = ();
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
|
@ -248,7 +248,7 @@ impl<'de, 'a> Visitor<'de> for TagValuesTupleVisitor<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'de, 'a> DeserializeSeed<'de> for TagValuesTuple<'a> {
|
||||
impl<'de> DeserializeSeed<'de> for TagValuesTuple<'_> {
|
||||
type Value = ();
|
||||
|
||||
fn deserialize<D: Deserializer<'de>>(self, deserializer: D) -> Result<(), D::Error> {
|
||||
|
|
|
@ -237,7 +237,7 @@ impl Drop for RecMutex {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> Drop for TaskLockGuard<'a> {
|
||||
impl Drop for TaskLockGuard<'_> {
|
||||
#[inline]
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
|
|
|
@ -937,8 +937,8 @@ impl glib::types::StaticType for Array {
|
|||
#[derive(Debug, Clone)]
|
||||
pub struct ArrayRef<'a>(&'a [glib::SendValue]);
|
||||
|
||||
unsafe impl<'a> Send for ArrayRef<'a> {}
|
||||
unsafe impl<'a> Sync for ArrayRef<'a> {}
|
||||
unsafe impl Send for ArrayRef<'_> {}
|
||||
unsafe impl Sync for ArrayRef<'_> {}
|
||||
|
||||
impl<'a> ArrayRef<'a> {
|
||||
pub fn new(values: &'a [glib::SendValue]) -> Self {
|
||||
|
@ -953,7 +953,7 @@ impl<'a> ArrayRef<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ops::Deref for ArrayRef<'a> {
|
||||
impl ops::Deref for ArrayRef<'_> {
|
||||
type Target = [glib::SendValue];
|
||||
|
||||
#[inline]
|
||||
|
@ -962,7 +962,7 @@ impl<'a> ops::Deref for ArrayRef<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> AsRef<[glib::SendValue]> for ArrayRef<'a> {
|
||||
impl AsRef<[glib::SendValue]> for ArrayRef<'_> {
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &[glib::SendValue] {
|
||||
self.as_slice()
|
||||
|
@ -988,7 +988,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for ArrayRef<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> glib::value::ToValue for ArrayRef<'a> {
|
||||
impl glib::value::ToValue for ArrayRef<'_> {
|
||||
#[inline]
|
||||
fn to_value(&self) -> glib::Value {
|
||||
let mut value = glib::Value::for_value_type::<Array>();
|
||||
|
@ -1014,7 +1014,7 @@ impl<'a> From<ArrayRef<'a>> for glib::Value {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> glib::types::StaticType for ArrayRef<'a> {
|
||||
impl glib::types::StaticType for ArrayRef<'_> {
|
||||
#[inline]
|
||||
fn static_type() -> glib::types::Type {
|
||||
unsafe { from_glib(ffi::gst_value_array_get_type()) }
|
||||
|
@ -1164,8 +1164,8 @@ impl glib::types::StaticType for List {
|
|||
#[derive(Debug, Clone)]
|
||||
pub struct ListRef<'a>(&'a [glib::SendValue]);
|
||||
|
||||
unsafe impl<'a> Send for ListRef<'a> {}
|
||||
unsafe impl<'a> Sync for ListRef<'a> {}
|
||||
unsafe impl Send for ListRef<'_> {}
|
||||
unsafe impl Sync for ListRef<'_> {}
|
||||
|
||||
impl<'a> ListRef<'a> {
|
||||
pub fn new(values: &'a [glib::SendValue]) -> Self {
|
||||
|
@ -1180,7 +1180,7 @@ impl<'a> ListRef<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> ops::Deref for ListRef<'a> {
|
||||
impl ops::Deref for ListRef<'_> {
|
||||
type Target = [glib::SendValue];
|
||||
|
||||
#[inline]
|
||||
|
@ -1189,7 +1189,7 @@ impl<'a> ops::Deref for ListRef<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> AsRef<[glib::SendValue]> for ListRef<'a> {
|
||||
impl AsRef<[glib::SendValue]> for ListRef<'_> {
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &[glib::SendValue] {
|
||||
self.as_slice()
|
||||
|
@ -1215,7 +1215,7 @@ unsafe impl<'a> glib::value::FromValue<'a> for ListRef<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> glib::value::ToValue for ListRef<'a> {
|
||||
impl glib::value::ToValue for ListRef<'_> {
|
||||
#[inline]
|
||||
fn to_value(&self) -> glib::Value {
|
||||
let mut value = glib::Value::for_value_type::<List>();
|
||||
|
@ -1241,7 +1241,7 @@ impl<'a> From<ListRef<'a>> for glib::Value {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> glib::types::StaticType for ListRef<'a> {
|
||||
impl glib::types::StaticType for ListRef<'_> {
|
||||
#[inline]
|
||||
fn static_type() -> glib::types::Type {
|
||||
unsafe { from_glib(ffi::gst_value_list_get_type()) }
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/// macOS has a specific requirement that there must be a run loop running on the main thread in
|
||||
/// order to open windows and use OpenGL, and that the global NSApplication instance must be
|
||||
/// initialized.
|
||||
|
||||
/// On macOS this launches the callback function on a thread.
|
||||
/// On other platforms it's just executed immediately.
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
|
|
Loading…
Reference in a new issue