forked from rojo-rbx/rojo
Add PathMap::orphans for traversing the map's roots
This commit is contained in:
@@ -156,6 +156,10 @@ impl<T> PathMap<T> {
|
|||||||
current_path
|
current_path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn orphans(&self) -> impl Iterator<Item = &Path> {
|
||||||
|
self.orphan_paths.iter().map(|item| item.as_ref())
|
||||||
|
}
|
||||||
|
|
||||||
/// Adds the path to its parent if it's present in the tree, or the set of
|
/// Adds the path to its parent if it's present in the tree, or the set of
|
||||||
/// orphaned paths if it is not.
|
/// orphaned paths if it is not.
|
||||||
fn add_to_parent(&mut self, path: PathBuf) {
|
fn add_to_parent(&mut self, path: PathBuf) {
|
||||||
|
|||||||
Reference in New Issue
Block a user