diff --git a/lib/src/revset.rs b/lib/src/revset.rs index 263074e72..16c5872c1 100644 --- a/lib/src/revset.rs +++ b/lib/src/revset.rs @@ -301,10 +301,7 @@ impl RevsetExpression { /// Parents of `self`. pub fn parents(self: &Rc) -> Rc { - Rc::new(RevsetExpression::Ancestors { - heads: self.clone(), - generation: 1..2, - }) + self.ancestors_at(1) } /// Ancestors of `self`, including `self`. @@ -331,10 +328,7 @@ impl RevsetExpression { /// Children of `self`. pub fn children(self: &Rc) -> Rc { - Rc::new(RevsetExpression::Descendants { - roots: self.clone(), - generation: 1..2, - }) + self.descendants_at(1) } /// Descendants of `self`, including `self`.