Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shardtree: Don't insert empty subtrees in
ShardTree::insert_tree
`ShardTree::max_leaf_position` relies on the invariant that the last shard in the subtrees vector is never created without a leaf then being added to it. `LocatedTree::decompose_to_level` can return a trailing empty subtree for some inputs, and given that it is always correct to not insert an empty subtree into `self`, we maintain the invariant by skipping empty subtrees.
- Loading branch information