rav1d 1.1.0

Rust port of the dav1d AV1 decoder
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
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),
        }
    }
}