rvimage 0.8.3

A remote image viewer with a labeling tool
Documentation
use std::fmt::Debug;
use tracing::{error, warn};
pub fn ignore_error<T, E>(x: Result<T, E>) -> Option<T>
where
    E: Debug,
{
    x.ok()
}
pub fn trace_ok_err<T, E>(x: Result<T, E>) -> Option<T>
where
    E: Debug,
{
    match x {
        Ok(x) => Some(x),
        Err(e) => {
            error!("{e:?}");
            None
        }
    }
}
pub fn trace_ok_warn<T, E>(x: Result<T, E>) -> Option<T>
where
    E: Debug,
{
    match x {
        Ok(x) => Some(x),
        Err(e) => {
            warn!("{e:?}");
            None
        }
    }
}