rav1d-safe 0.5.3

Safe SIMD fork of rav1d - Rust AV1 decoder with archmage intrinsics
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![forbid(unsafe_code)]
pub trait OptionError<E> {
    fn err_or<T>(self, ok: T) -> Result<T, E>;
}

impl<E> OptionError<E> for Option<E> {
    #[inline]
    fn err_or<T>(self, ok: T) -> Result<T, E> {
        match self {
            Some(e) => Err(e),
            None => Ok(ok),
        }
    }
}