tree: make sub_tree_recursive() public

These functions (in `Tree` and `MergedTree`) are safe to use. We have
a duplicate of these functions at Google, which would be nice to
avoid.
This commit is contained in:
Martin von Zweigbergk 2024-05-22 07:36:40 -07:00 committed by Martin von Zweigbergk
parent 50dd78eb8f
commit cd5e82d0d3
2 changed files with 4 additions and 2 deletions

View file

@ -268,7 +268,8 @@ impl MergedTree {
}
}
fn sub_tree_recursive(
/// Look up the tree at the path indicated by `components`.
pub fn sub_tree_recursive(
&self,
components: RepoPathComponentsIter,
) -> BackendResult<Option<MergedTree>> {

View file

@ -154,7 +154,8 @@ impl Tree {
self.store.get_tree(subdir, id).unwrap()
}
fn sub_tree_recursive(
/// Look up the tree at the path indicated by `components`.
pub fn sub_tree_recursive(
&self,
components: RepoPathComponentsIter,
) -> BackendResult<Option<Tree>> {