(&self, node_id: u64, depth: i64, nodes: &mut Vec<Value>)
| 1665 | } |
| 1666 | |
| 1667 | fn append_flattened(&self, node_id: u64, depth: i64, nodes: &mut Vec<Value>) { |
| 1668 | nodes.push(self.node_value(node_id, 0)); |
| 1669 | if depth == 0 { |
| 1670 | return; |
| 1671 | } |
| 1672 | if let Some(node) = self.nodes.get(&node_id) { |
| 1673 | let next_depth = if depth < 0 { -1 } else { depth - 1 }; |
| 1674 | for child_id in &node.children { |
| 1675 | self.append_flattened(*child_id, next_depth, nodes); |
| 1676 | } |
| 1677 | } |
| 1678 | } |
| 1679 | |
| 1680 | fn describe_node(&self, node_id: u64) -> Value { |
| 1681 | if node_id == 1 { |
no test coverage detected