melib/email/parser: impl Debug for ParsingError

pull/144/head
Manos Pitsidianakis 2022-06-04 16:02:14 +03:00
parent 6a843d4983
commit d6355a3043
1 changed files with 9 additions and 0 deletions

View File

@ -55,6 +55,15 @@ impl core::fmt::Debug for ParsingError<&'_ [u8]> {
}
}
impl core::fmt::Debug for ParsingError<&'_ str> {
fn fmt(&self, fmt: &mut core::fmt::Formatter) -> core::fmt::Result {
fmt.debug_struct("ParsingError")
.field("input", &self.input)
.field("error", &self.error)
.finish()
}
}
struct DebugOkWrapper<'r, I, R: AsRef<[u8]>>(&'r IResult<I, R>);
impl<R: AsRef<[u8]> + core::fmt::Debug> core::fmt::Debug for DebugOkWrapper<'_, &'_ [u8], R> {