Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
Nathan Sobo
2021-09-28 12:03:11 -06:00
co-authored by Max Brunsfeld
parent b9b08879f2
commit 60799c5a7c
+2 -2
View File
@@ -2622,7 +2622,7 @@ impl<'a> Traversal<'a> {
)
}
pub fn advance_sibling(&mut self) -> bool {
pub fn advance_to_sibling(&mut self) -> bool {
while let Some(entry) = self.cursor.item() {
self.cursor.seek_forward(
&TraversalTarget::PathSuccessor(&entry.path),
@@ -2703,7 +2703,7 @@ impl<'a> Iterator for ChildEntriesIter<'a> {
fn next(&mut self) -> Option<Self::Item> {
if let Some(item) = self.traversal.entry() {
if item.path.starts_with(&self.parent_path) {
self.traversal.advance_sibling();
self.traversal.advance_to_sibling();
return Some(item);
}
}