D5365: rust: AncestorsIterator::next, renamed local variables

gracinet (Georges Racinet) phabricator at mercurial-scm.org
Wed Dec 5 06:57:33 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG70976974c14a: rust: rename local variables in AncestorsIterator::next (authored by gracinet, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5365?vs=12695&id=12709

REVISION DETAIL
  https://phab.mercurial-scm.org/D5365

AFFECTED FILES
  rust/hg-core/src/ancestors.rs

CHANGE DETAILS

diff --git a/rust/hg-core/src/ancestors.rs b/rust/hg-core/src/ancestors.rs
--- a/rust/hg-core/src/ancestors.rs
+++ b/rust/hg-core/src/ancestors.rs
@@ -126,19 +126,18 @@
             }
             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 {
             *(self.visit.peek_mut().unwrap()) = p1;
             self.seen.insert(p1);
         };
 
-        self.conditionally_push_rev(parents.1);
+        self.conditionally_push_rev(p2);
         Some(current)
     }
 }



To: gracinet, #hg-reviewers
Cc: durin42, kevincox, mercurial-devel


More information about the Mercurial-devel mailing list