Actually impl Display for Error
This commit is contained in:
parent
72a15eed07
commit
e178b93ffb
10
src/main.rs
10
src/main.rs
|
@ -28,7 +28,15 @@ pub enum Error {
|
||||||
|
|
||||||
impl std::fmt::Display for Error {
|
impl std::fmt::Display for Error {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
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),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue