D5944: rust: stop putting NULL_REVISION in MissingAncestors.bases

kevincox (Kevin Cox) phabricator at mercurial-scm.org
Tue Feb 12 09:54:17 EST 2019


kevincox accepted this revision.
kevincox added inline comments.

INLINE COMMENTS

> ancestors.rs:245
>          self.bases.extend(new_bases);
> +        self.bases.remove(&NULL_REVISION);
>      }

I think it would be more clear if you filtered the NULL_REVISION out before extending the set.

  let new_bases = new_bases.into_iter().filter(|&rev| rev != NULL_REVISION);
  self.bases.extend(new_bases);

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list