about summary refs log tree commit diff stats
path: root/crates/libmpv2/src/mpv
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--crates/libmpv2/src/mpv.rs28
-rw-r--r--crates/libmpv2/src/mpv/events.rs2
-rw-r--r--crates/libmpv2/src/mpv/protocol.rs2
3 files changed, 16 insertions, 16 deletions
diff --git a/crates/libmpv2/src/mpv.rs b/crates/libmpv2/src/mpv.rs
index 29dac8d..d8164c0 100644
--- a/crates/libmpv2/src/mpv.rs
+++ b/crates/libmpv2/src/mpv.rs
@@ -552,21 +552,21 @@ impl Mpv {
     ///
     /// # Examples
     ///
-    /// ```dont_run
-    /// # use libmpv2::{Mpv};
-    /// # use libmpv2::mpv_node::MpvNode;
-    /// # use libmpv2::mpv::errors::Result;
-    /// # use std::collections::HashMap;
-    /// #
-    /// # fn main() -> Result<()> {
-    /// # let mpv = Mpv::new()?;
+    /// ```text
+    ///# use libmpv2::{Mpv};
+    ///# use libmpv2::mpv_node::MpvNode;
+    ///# use libmpv2::mpv::errors::Result;
+    ///# use std::collections::HashMap;
+    ///#
+    ///# fn main() -> Result<()> {
+    ///# let mpv = Mpv::new()?;
     /// mpv.command("loadfile", &["test-data/jellyfish.mp4", "append-play"]).unwrap();
-    /// # let node = mpv.get_property::<MpvNode>("playlist").unwrap();
-    /// # let mut list = node.array().unwrap().collect::<Vec<_>>();
-    /// # let map = list.pop().unwrap().map().unwrap().collect::<HashMap<_, _>>();
-    /// # assert_eq!(map, HashMap::from([(String::from("id"), MpvNode::Int64(1)), (String::from("current"), MpvNode::Flag(true)), (String::from("filename"), MpvNode::String(String::from("test-data/jellyfish.mp4")))]));
-    /// # Ok(())
-    /// # }
+    ///# let node = mpv.get_property::<MpvNode>("playlist").unwrap();
+    ///# let mut list = node.array().unwrap().collect::<Vec<_>>();
+    ///# let map = list.pop().unwrap().map().unwrap().collect::<HashMap<_, _>>();
+    ///# assert_eq!(map, HashMap::from([(String::from("id"), MpvNode::Int64(1)), (String::from("current"), MpvNode::Flag(true)), (String::from("filename"), MpvNode::String(String::from("test-data/jellyfish.mp4")))]));
+    ///# Ok(())
+    ///# }
     /// ```
     pub fn command(&self, name: &str, args: &[&str]) -> Result<()> {
         fn escape(input: &str) -> String {
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,