diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-02-16 18:21:02 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-02-16 18:21:02 +0100 |
commit | 55a94110287ad2b1a55953febac48422a9d3ba89 (patch) | |
tree | ca57ff2df49383e3f34a31df8c7c7e3d06470ba1 /crates/libmpv2/src/mpv/protocol.rs | |
parent | refactor(yt/): Use the new `termsize` and `uu_fmt` crates (diff) | |
download | yt-55a94110287ad2b1a55953febac48422a9d3ba89.zip |
style(treewide): Re-format
Diffstat (limited to 'crates/libmpv2/src/mpv/protocol.rs')
-rw-r--r-- | crates/libmpv2/src/mpv/protocol.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/crates/libmpv2/src/mpv/protocol.rs b/crates/libmpv2/src/mpv/protocol.rs index 31a5933..c4f0e2f 100644 --- a/crates/libmpv2/src/mpv/protocol.rs +++ b/crates/libmpv2/src/mpv/protocol.rs @@ -17,7 +17,7 @@ use std::os::raw as ctype; use std::panic; use std::panic::RefUnwindSafe; use std::slice; -use std::sync::{atomic::Ordering, Mutex}; +use std::sync::{Mutex, atomic::Ordering}; impl Mpv { /// Create a context with which custom protocols can be registered. @@ -101,11 +101,7 @@ where let slice = slice::from_raw_parts_mut(buf, nbytes as _); ((*data).read_fn)(&mut *(*data).cookie, slice) }); - if let Ok(ret) = ret { - ret - } else { - -1 - } + if let Ok(ret) = ret { ret } else { -1 } } unsafe extern "C" fn seek_wrapper<T, U>(cookie: *mut ctype::c_void, offset: i64) -> i64 |