refactor: restore custom fmt::Debug for InnerEntry

this needs to follow Cid as we don't really need the Cid's fmt::Debug
impl.
This commit is contained in:
Joonas Koivunen 2020-08-14 10:27:00 +03:00
parent 59deeca4ae
commit e129973e03

View File

@ -311,7 +311,6 @@ impl Walker {
}
/// Represents what the `Walker` is currently looking at.
#[derive(Debug)]
struct InnerEntry {
cid: Cid,
kind: InnerKind,
@ -534,6 +533,18 @@ impl InnerEntry {
}
}
impl fmt::Debug for InnerEntry {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt.debug_struct("InnerEntry")
.field("depth", &self.depth)
.field("kind", &self.kind)
.field("cid", &format_args!("{}", self.cid))
.field("path", &self.path)
.field("metadata", &self.metadata)
.finish()
}
}
/// Representation of the walk progress.
#[derive(Debug)]
pub enum ContinuedWalk<'a> {