Skip to content

Commit 422889c

Browse files
committed
Improve documentation of private extend_to_level method.
1 parent 1ad56ad commit 422889c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

shardtree/src/prunable.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -651,9 +651,13 @@ impl<H: Hashable + Clone + PartialEq> LocatedPrunableTree<H> {
651651
}
652652
}
653653

654-
// In the case that we are replacing a node entirely, we need to extend the
655-
// subtree up to the level of the node being replaced, adding Nil siblings
656-
// and recording the presence of those incomplete nodes when necessary
654+
// In the case that we are replacing a node entirely, we need to extend the subtree up to the
655+
// level of the node being replaced, adding Nil siblings and recording the presence of those
656+
// incomplete nodes when necessary. The newly created root node will be annotated with the
657+
// provided value.
658+
//
659+
// If the root level of `self` is greater than or equal to the requested level, no extension
660+
// will be performed, but the root node will still be reannotated.
657661
fn extend_to_level(
658662
self,
659663
level: Level,

0 commit comments

Comments
 (0)