Fold subtrees
This commit is contained in:
parent
26923745ad
commit
0ad3432141
4 changed files with 69 additions and 10 deletions
|
|
@ -23,6 +23,10 @@ impl<I> Path<I> {
|
|||
Self(segments)
|
||||
}
|
||||
|
||||
pub fn parent_segments(&self) -> impl Iterator<Item = &I> {
|
||||
self.0.iter().take(self.0.len() - 1)
|
||||
}
|
||||
|
||||
pub fn push(&mut self, segment: I) {
|
||||
self.0.push(segment)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue