Fixed use of std::fmt rather than core::fmt (#22)

Co-authored-by: Jane Lusby <jlusby@yaah.dev>
This commit is contained in:
Duncan R Hamill 2020-05-30 01:51:00 +01:00 committed by GitHub
parent 3621a4b66e
commit be64ee415a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,13 +10,13 @@ where
self.context
.as_ref()
.map(|context| context.display(self.error(), f))
.unwrap_or_else(|| std::fmt::Display::fmt(self.error(), f))
.unwrap_or_else(|| core::fmt::Display::fmt(self.error(), f))
}
pub(crate) fn debug(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.context
.as_ref()
.map(|context| context.debug(self.error(), f))
.unwrap_or_else(|| std::fmt::Debug::fmt(self.error(), f))
.unwrap_or_else(|| core::fmt::Debug::fmt(self.error(), f))
}
}