pub(crate) fn resolve(x: libc::c_int) -> Result<()> {
        use OppaiError::*;
        Err(Error::OppaiReturns(match x {
            0 => return Ok(()),
            -1 => ErrMore,
            -2 => ErrSyntax,
            -3 => ErrTruncated,
            -4 => ErrNotImplemented,
            -5 => ErrIO,
            -6 => ErrFormat,
            -7 => ErrOOM,
            _ => return Err(Error::OppaiFails("Unknown error code")),
        }))
    }
/// Resolves a libc returns from a call into a Result.
Resolves a libc returns from a call into a Result.
Resolves a libc returns from a call into a Result .
pub(crate) fn resolve(x: libc::c_int) -> Result<()> {
        use OppaiError::*;
        Err(Error::OppaiReturns(match x {
            0 => return Ok(()),
            -1 => ErrMore,
            -2 => ErrSyntax,
            -3 => ErrTruncated,
            -4 => ErrNotImplemented,
            -5 => ErrIO,
            -6 => ErrFormat,
            -7 => ErrOOM,
            _ => return Err(Error::OppaiFails("Unknown error code")),
        }))
    }
pub ( crate ) fn resolve ( x : libc :: c_int ) -> Result < ( ) > { use OppaiError :: * ; Err ( Error :: OppaiReturns ( match x { 0 => return Ok ( ( ) ) , - 1 => ErrMore , - 2 => ErrSyntax , - 3 => ErrTruncated , - 4 => ErrNotImplemented , - 5 => ErrIO , - 6 => ErrFormat , - 7 => ErrOOM , _ => return Err ( Error :: OppaiFails ( " " ) ) , } ) ) }
Resolves a libc returns from a call into a Result.
Resolves a libc returns from a call into a Result .
x
libc::c_int
x
libc::c_int