aboutsummaryrefslogblamecommitdiff
blob: 3ef18195d3fda0a2c6b56c4c09f1b15a0db19157 (plain) (tree)



















                                                                                   
use std::fmt::{Display, Formatter};

/// Necessary because of this issue: https://github.com/actix/actix-web/issues/1711
#[derive(Debug)]
pub struct Error(pub(crate) anyhow::Error);

impl Display for Error {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(&self.0, f)
    }
}

impl<T> From<T> for Error
where
    T: Into<anyhow::Error>,
{
    fn from(t: T) -> Self {
        Error(t.into())
    }
}
Powered by cgit v1.2.3 (git 2.41.0)