diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-11-30 15:28:05 +0100 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-11-30 15:28:05 +0100 |
| commit | 8158bcf6da8163fd35f26b59a08fc7f5a9abce11 (patch) | |
| tree | 2fa97f7ab34d187606ae0ceb1061979a610d44b3 /crates/libmpv2/src | |
| parent | build(treewide): Update (diff) | |
| download | yt-8158bcf6da8163fd35f26b59a08fc7f5a9abce11.zip | |
fix(treewide): Avoid using deprecated functions or patterns
Diffstat (limited to 'crates/libmpv2/src')
| -rw-r--r-- | crates/libmpv2/src/mpv/events.rs | 2 | ||||
| -rw-r--r-- | crates/libmpv2/src/mpv/protocol.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/libmpv2/src/mpv/events.rs b/crates/libmpv2/src/mpv/events.rs index f10ff6e..9f6324a 100644 --- a/crates/libmpv2/src/mpv/events.rs +++ b/crates/libmpv2/src/mpv/events.rs @@ -238,7 +238,7 @@ impl EventContext { /// Returns `Some(Err(...))` if there was invalid utf-8, or if either an /// `MPV_EVENT_GET_PROPERTY_REPLY`, `MPV_EVENT_SET_PROPERTY_REPLY`, `MPV_EVENT_COMMAND_REPLY`, /// or `MPV_EVENT_PROPERTY_CHANGE` event failed, or if `MPV_EVENT_END_FILE` reported an error. - pub fn wait_event(&mut self, timeout: f64) -> Option<Result<Event>> { + pub fn wait_event(&mut self, timeout: f64) -> Option<Result<Event<'_>>> { let event = unsafe { *libmpv2_sys::mpv_wait_event(self.ctx.as_ptr(), timeout) }; // debug!("Got an event from mpv: {:#?}", event); diff --git a/crates/libmpv2/src/mpv/protocol.rs b/crates/libmpv2/src/mpv/protocol.rs index ee33411..070fb66 100644 --- a/crates/libmpv2/src/mpv/protocol.rs +++ b/crates/libmpv2/src/mpv/protocol.rs @@ -24,7 +24,7 @@ impl Mpv { /// /// # Panics /// Panics if a context already exists - pub fn create_protocol_context<T, U>(&self) -> ProtocolContext<T, U> + pub fn create_protocol_context<T, U>(&self) -> ProtocolContext<'_, T, U> where T: RefUnwindSafe, U: RefUnwindSafe, |
