implement Debug for ErrorKind

This commit is contained in:
Terts Diepraam
2024-03-22 23:32:24 +01:00
parent c9c2c759e1
commit 207e291f55
+7 -1
View File
@@ -66,7 +66,7 @@ impl StdError for Error {}
impl Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.kind.fmt(f)
std::fmt::Display::fmt(&self.kind, f)
}
}
@@ -76,6 +76,12 @@ impl Debug for Error {
}
}
impl Debug for ErrorKind {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
std::fmt::Display::fmt(self, f)
}
}
impl Display for ErrorKind {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "error: ")?;