MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / append_flattened

Method append_flattened

packages/server/src/devtools.rs:1667–1678  ·  view source on GitHub ↗
(&self, node_id: u64, depth: i64, nodes: &mut Vec<Value>)

Source from the content-addressed store, hash-verified

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 {

Callers 1

flattened_nodesMethod · 0.80

Calls 2

node_valueMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected