kevincox accepted this revision.
kevincox added inline comments.

INLINE COMMENTS

> discovery.rs:70
> +        };
> +        if seen.contains(&current) {
> +            continue;

You can do

  if see.insert(current).is_some() {
    continue; // Already present.
  }

And avoid the insert below. Alternatively use the entry API which may be a bit 
more readable.

> discovery.rs:87
> +        seen.insert(current);
> +        for p in parentsfn(current)?.iter().cloned() {
> +            if p == NULL_REVISION {

You can pattern match away the reference since `Revision` is `Copy`.

  for &p in parentsfn(curent)? {
    // ...
  }

REPOSITORY
  rHG Mercurial

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

To: gracinet, #hg-reviewers, kevincox
Cc: durin42, kevincox, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to