use core::fmt::{self, Debug, Display}; #[derive(Clone, PartialEq, Eq)] pub struct DisplayError(pub T); impl Debug for DisplayError where T: Debug, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.0.fmt(f) } } impl Display for DisplayError where T: Display, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.0.fmt(f) } } impl snafu::Error for DisplayError where T: Display + Debug {}