more refactor

This commit is contained in:
John Smith
2023-02-25 22:02:13 -05:00
parent e328bdc270
commit 1fba8831e8
10 changed files with 203 additions and 127 deletions

View File

@@ -159,15 +159,9 @@ impl RoutingTable {
out
}
pub(crate) fn debug_info_entry(&self, node_id: TypedKey) -> String {
pub(crate) fn debug_info_entry(&self, node_ref: NodeRef) -> String {
let mut out = String::new();
out += &format!("Entry {:?}:\n", node_id);
if let Some(nr) = self.lookup_node_ref(node_id) {
out += &nr.operate(|_rt, e| format!("{:#?}\n", e));
} else {
out += "Entry not found\n";
}
out += &node_ref.operate(|_rt, e| format!("{:#?}\n", e));
out
}