Reimplement Debug for File

This commit is contained in:
Matthias Beyer 2015-12-02 11:35:01 +01:00
parent 535952c2a5
commit 9493c79104

View file

@ -295,14 +295,6 @@ impl<'a> File<'a> {
} }
} }
impl Debug for File {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
write!(f, "File[{:?}] header: '{:?}', data: '{:?}')",
self.id, self.header, self.data)
}
}
impl<'a> Display for File<'a> { impl<'a> Display for File<'a> {
fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result {
@ -320,3 +312,19 @@ impl<'a> Display for File<'a> {
} }
impl<'a> Debug for File<'a> {
fn fmt(&self, fmt: &mut Formatter) -> fmt::Result {
write!(fmt,
"[File] Owner : '{:?}'
FileID: '{:?}'
Header: '{:?}'
Data : '{:?}'",
self.owning_module,
self.header,
self.data,
self.id);
Ok(())
}
}