debugging

This commit is contained in:
John Smith
2022-05-24 22:46:30 -04:00
parent 79d2559efd
commit 7ca202440b
5 changed files with 114 additions and 220 deletions

View File

@@ -274,7 +274,16 @@ impl Eq for NodeRef {}
impl fmt::Debug for NodeRef {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.node_id.encode())
if f.alternate() {
write!(
f,
"{{\n id: {}\n filter: {:?}\n}}",
self.node_id.encode(),
self.filter
)
} else {
write!(f, "{}", self.node_id.encode())
}
}
}