Fix documentation tests, with a hidden use mpvipc::Mpv
This commit is contained in:
parent
a43401b6c4
commit
a14b02fb10
|
@ -316,6 +316,7 @@ impl Mpv {
|
||||||
///
|
///
|
||||||
/// #Example
|
/// #Example
|
||||||
/// ```
|
/// ```
|
||||||
|
/// # use mpvipc::Mpv;
|
||||||
/// let mpv = Mpv::connect("/tmp/mpvsocket").unwrap();
|
/// let mpv = Mpv::connect("/tmp/mpvsocket").unwrap();
|
||||||
/// let paused: bool = mpv.get_property("pause").unwrap();
|
/// let paused: bool = mpv.get_property("pause").unwrap();
|
||||||
/// let title: String = mpv.get_property("media-title").unwrap();
|
/// let title: String = mpv.get_property("media-title").unwrap();
|
||||||
|
@ -336,6 +337,7 @@ impl Mpv {
|
||||||
/// #Example
|
/// #Example
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
|
/// # use mpvipc::Mpv;
|
||||||
/// let mpv = Mpv::connect("/tmp/mpvsocket").unwrap();
|
/// let mpv = Mpv::connect("/tmp/mpvsocket").unwrap();
|
||||||
/// let title = mpv.get_property_string("media-title").unwrap();
|
/// let title = mpv.get_property_string("media-title").unwrap();
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -354,7 +356,8 @@ impl Mpv {
|
||||||
/// #Example
|
/// #Example
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// let mpv = Mpv::connect("/tmp/mpvsocket").unwrap();
|
/// # use mpvipc::Mpv;
|
||||||
|
/// let mut mpv = Mpv::connect("/tmp/mpvsocket").unwrap();
|
||||||
/// loop {
|
/// loop {
|
||||||
/// let event = mpv.event_listen().unwrap();
|
/// let event = mpv.event_listen().unwrap();
|
||||||
/// println!("{:?}", event);
|
/// println!("{:?}", event);
|
||||||
|
@ -399,6 +402,7 @@ impl Mpv {
|
||||||
///
|
///
|
||||||
/// #Example
|
/// #Example
|
||||||
/// ```
|
/// ```
|
||||||
|
/// # use mpvipc::Mpv;
|
||||||
/// let mpv = Mpv::connect("/tmp/mpvsocket").unwrap();
|
/// let mpv = Mpv::connect("/tmp/mpvsocket").unwrap();
|
||||||
///
|
///
|
||||||
/// //Run command 'playlist-shuffle' which takes no arguments
|
/// //Run command 'playlist-shuffle' which takes no arguments
|
||||||
|
@ -579,6 +583,7 @@ impl Mpv {
|
||||||
///
|
///
|
||||||
/// #Example
|
/// #Example
|
||||||
/// ```
|
/// ```
|
||||||
|
/// # use mpvipc::Mpv;
|
||||||
/// let mpv = Mpv::connect("/tmp/mpvsocket").unwrap();
|
/// let mpv = Mpv::connect("/tmp/mpvsocket").unwrap();
|
||||||
/// mpv.set_property("pause", true);
|
/// mpv.set_property("pause", true);
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -638,4 +643,4 @@ impl Mpv {
|
||||||
Err(msg) => Err(msg),
|
Err(msg) => Err(msg),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue