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

login
register
mail settings
Submitter phabricator
Date Dec. 5, 2018, 11:57 a.m.
Message ID <8a261eb77b7e4cd205065938973d0083@localhost.localdomain>
Download mbox | patch
Permalink /patch/36973/
State Not Applicable
Headers show

Comments

phabricator - Dec. 5, 2018, 11:57 a.m.
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




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

Patch

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)
     }
 }