D5358: rust: peek_mut optim for lazy ancestors

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Tue Dec 4 07:46:51 EST 2018


yuja added a comment.


  Queued, thanks.
  
  > +        let parents = self
  >  +            .graph
  >  +            .parents(current)
  >  +            .unwrap_or((NULL_REVISION, NULL_REVISION));
  >  +        let p0 = parents.0;
  
  I've renamed it to `p1` since that's the convention of Mercurial codebase.
  
  Maybe it can be rewritten as `let (p1, p2) = parents` to get rid of confusing
  tuple indexing.

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list