Mercurial > hg
changeset 40832:70976974c14a
rust: rename local variables in AncestorsIterator::next
It was confusing to have p1 and parents.1 ; (p1, p2) is clearer.
Differential Revision: https://phab.mercurial-scm.org/D5365
author | Georges Racinet <georges@racinet.fr> |
---|---|
date | Tue, 04 Dec 2018 14:01:13 +0000 |
parents | 59aed775610a |
children | 9072a890e523 |
files | rust/hg-core/src/ancestors.rs |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/rust/hg-core/src/ancestors.rs Tue Dec 04 17:34:10 2018 -0500 +++ b/rust/hg-core/src/ancestors.rs Tue Dec 04 14:01:13 2018 +0000 @@ -126,11 +126,10 @@ } Some(c) => *c, }; - let parents = self + let (p1, p2) = self .graph .parents(current) .unwrap_or((NULL_REVISION, NULL_REVISION)); - let p1 = parents.0; if p1 < self.stoprev || self.seen.contains(&p1) { self.visit.pop(); } else { @@ -138,7 +137,7 @@ self.seen.insert(p1); }; - self.conditionally_push_rev(parents.1); + self.conditionally_push_rev(p2); Some(current) } }