mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-19 19:08:08 +00:00
revset: forward RevsetExpression::parents()/children() to inner functions
This commit is contained in:
parent
7c9f28a96f
commit
059fc26df1
1 changed files with 2 additions and 8 deletions
|
@ -301,10 +301,7 @@ impl RevsetExpression {
|
||||||
|
|
||||||
/// Parents of `self`.
|
/// Parents of `self`.
|
||||||
pub fn parents(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression> {
|
pub fn parents(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression> {
|
||||||
Rc::new(RevsetExpression::Ancestors {
|
self.ancestors_at(1)
|
||||||
heads: self.clone(),
|
|
||||||
generation: 1..2,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Ancestors of `self`, including `self`.
|
/// Ancestors of `self`, including `self`.
|
||||||
|
@ -331,10 +328,7 @@ impl RevsetExpression {
|
||||||
|
|
||||||
/// Children of `self`.
|
/// Children of `self`.
|
||||||
pub fn children(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression> {
|
pub fn children(self: &Rc<RevsetExpression>) -> Rc<RevsetExpression> {
|
||||||
Rc::new(RevsetExpression::Descendants {
|
self.descendants_at(1)
|
||||||
roots: self.clone(),
|
|
||||||
generation: 1..2,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Descendants of `self`, including `self`.
|
/// Descendants of `self`, including `self`.
|
||||||
|
|
Loading…
Reference in a new issue