mirror of
https://github.com/martinvonz/jj.git
synced 2025-02-01 00:50:57 +00:00
matchers: inline RepoPathTree::get_visit_sets()
This commit is contained in:
parent
8e196d0025
commit
e0d5217450
1 changed files with 3 additions and 7 deletions
|
@ -141,7 +141,9 @@ impl Matcher for FilesMatcher {
|
|||
}
|
||||
|
||||
fn visit(&self, dir: &RepoPath) -> Visit {
|
||||
self.tree.get_visit_sets(dir)
|
||||
self.tree
|
||||
.get(dir)
|
||||
.map_or(Visit::Nothing, RepoPathTree::to_visit_sets)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -366,12 +368,6 @@ impl RepoPathTree {
|
|||
.try_fold(self, |sub, name| sub.entries.get(name))
|
||||
}
|
||||
|
||||
fn get_visit_sets(&self, dir: &RepoPath) -> Visit {
|
||||
self.get(dir)
|
||||
.map(RepoPathTree::to_visit_sets)
|
||||
.unwrap_or(Visit::Nothing)
|
||||
}
|
||||
|
||||
/// Walks the tree from the root to the given `dir`, yielding each sub tree
|
||||
/// and remaining path.
|
||||
fn walk_to<'a, 'b: 'a>(
|
||||
|
|
Loading…
Reference in a new issue