catalog: impl std::fmt::Display trait for CatalogEntryType

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
Christian Ebner
2019-11-11 14:19:54 +01:00
committed by Dietmar Maurer
parent cd88ccae99
commit 3f1c5b5e65
2 changed files with 10 additions and 3 deletions

View File

@ -323,7 +323,7 @@ impl <R: Read + Seek> CatalogReader<R> {
match etype {
CatalogEntryType::Directory => {
println!("{} {:?}", char::from(etype as u8), path);
println!("{} {:?}", etype, path);
if offset > start {
bail!("got wrong directory offset ({} > {})", offset, start);
}
@ -335,14 +335,14 @@ impl <R: Read + Seek> CatalogReader<R> {
println!(
"{} {:?} {} {}",
char::from(etype as u8),
etype,
path,
size,
dt.to_rfc3339_opts(chrono::SecondsFormat::Secs, false),
);
}
_ => {
println!("{} {:?}", char::from(etype as u8), path);
println!("{} {:?}", etype, path);
}
}