Implement Debug for File

This commit is contained in:
Matthias Beyer 2015-11-27 19:37:08 +01:00
parent 55d6de627a
commit c82f9ea6ae
1 changed files with 8 additions and 0 deletions

View File

@ -238,3 +238,11 @@ impl File {
}
}
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)
}
}