more placement info in Node fmt::Debug

This commit is contained in:
tali 2023-04-16 03:01:20 -04:00
parent 51c8d72711
commit 27e5394a8c
1 changed files with 4 additions and 4 deletions

View File

@ -130,14 +130,14 @@ impl Node {
impl core::fmt::Debug for Node { impl core::fmt::Debug for Node {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "Node(rating={}", self.rating)?; write!(f, "Node {{ rating: {}", self.rating)?;
if let Some(pc) = self.root_placement() { if let Some(pc) = self.root_placement() {
write!(f, ", root_placement={}", pc.ty)?; write!(f, ", root_placement: {:?}", pc)?;
} }
if !self.queue().is_empty() { if !self.queue().is_empty() {
write!(f, ", queue={}", self.queue())?; write!(f, ", queue: {}", self.queue())?;
} }
write!(f, ")") write!(f, " }}")
} }
} }