mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Add PathMap::orphans for traversing the map's roots
This commit is contained in:
parent
07fe963bed
commit
061a096600
1 changed files with 4 additions and 0 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue