kevincox added a comment.

  This is a nice improvement. It still seems odd to me to return a list of two 
parents when there could be 0, 1 or 2 parents. I guess this is for performance 
reasons?

INLINE COMMENTS

> ancestors.rs:62
> +            this.conditionally_push_rev(parents[0]);
> +            this.conditionally_push_rev(parents[1]);
>          }

I would do `let [p1, p2]`  still as it shows the reader that you handled all 
the nodes. Alternatively loop over them all.

  for parent in this.graph.parents(rev)? {
    this.conditionally_push_rev(parent);
  }

> ancestors.rs:118
>          };
> -        let (p1, p2) = match self.graph.parents(current) {
> +        let parents = match self.graph.parents(current) {
>              Ok(ps) => ps,

let [p1, p2] = ...

REPOSITORY
  rHG Mercurial

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

To: gracinet, #hg-reviewers
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