Actually impl Display for Error

This commit is contained in:
Yash Karandikar 2022-08-14 12:42:31 -05:00
parent 72a15eed07
commit e178b93ffb

View file

@ -28,7 +28,15 @@ pub enum Error {
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:#?}", self)
use std::fmt::Display;
use Error::*;
match self {
Database(e) => Display::fmt(e, f),
Tera(e) => Display::fmt(e, f),
Tokio(e) => Display::fmt(e, f),
Pbkdf2(e) => Display::fmt(e, f),
Session(e) => Display::fmt(e, f),
}
}
}