Skip to content

Commit a379950

Browse files
committed
Fix warnings about elided lifetimes.
1 parent 34f1d03 commit a379950

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/capturable/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub mod win_ctx;
1818
#[cfg(target_os = "linux")]
1919
pub mod x11;
2020
pub trait Recorder {
21-
fn capture(&mut self) -> Result<crate::video::PixelProvider, Box<dyn Error>>;
21+
fn capture(&mut self) -> Result<crate::video::PixelProvider<'_>, Box<dyn Error>>;
2222
}
2323

2424
pub trait BoxCloneCapturable {

src/capturable/pipewire.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl PipeWireRecorder {
168168
}
169169

170170
impl Recorder for PipeWireRecorder {
171-
fn capture(&mut self) -> Result<PixelProvider, Box<dyn Error>> {
171+
fn capture(&mut self) -> Result<PixelProvider<'_>, Box<dyn Error>> {
172172
if let Some(sample) = self
173173
.appsink
174174
.try_pull_sample(gst::ClockTime::from_mseconds(16))
@@ -305,7 +305,7 @@ where
305305
})
306306
}
307307

308-
fn get_portal(conn: &SyncConnection) -> Proxy<&SyncConnection> {
308+
fn get_portal(conn: &SyncConnection) -> Proxy<'_, &SyncConnection> {
309309
conn.with_proxy(
310310
"org.freedesktop.portal.Desktop",
311311
"/org/freedesktop/portal/desktop",

src/capturable/testsrc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl Capturable for TestCapturable {
8080
}
8181

8282
impl Recorder for TestRecorder {
83-
fn capture(&mut self) -> Result<PixelProvider, Box<dyn Error>> {
83+
fn capture(&mut self) -> Result<PixelProvider<'_>, Box<dyn Error>> {
8484
const N: usize = 120;
8585
let dh = self.capturable.height / N;
8686
let buf_ref = self.buf.as_mut();

src/capturable/x11.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ impl Drop for RecorderX11 {
321321
}
322322

323323
impl Recorder for RecorderX11 {
324-
fn capture(&mut self) -> Result<PixelProvider, Box<dyn Error>> {
324+
fn capture(&mut self) -> Result<PixelProvider<'_>, Box<dyn Error>> {
325325
let mut err = CError::new();
326326
self.capturable.disp.lock();
327327
unsafe {

0 commit comments

Comments
 (0)