()
| 2055 | } |
| 2056 | } |
| 2057 | |
| 2058 | /// Collect the leaf shard ids of an [`AggNode`] in left-to-right DFS order. |
| 2059 | fn dfs_leaf_order(node: &AggNode, out: &mut Vec<u32>) { |
| 2060 | match node { |
| 2061 | AggNode::Leaf(id) => out.push(*id), |
| 2062 | AggNode::Internal(l, r) => { |
| 2063 | dfs_leaf_order(l, out); |
| 2064 | dfs_leaf_order(r, out); |
| 2065 | }, |
| 2066 | } |
| 2067 | } |
| 2068 | |
| 2069 | /// A balanced binary [`AggNode`] over the contiguous shard-id range `lo..hi`. |
| 2070 | fn balanced_agg_tree(lo: u32, hi: u32) -> AggNode { |
| 2071 | debug_assert!(hi > lo); |
| 2072 | if hi - lo <= 1 { |
nothing calls this directly
no test coverage detected