D7254: rust-status: improve status performance

Alphare (Raphaël Gomès) phabricator at mercurial-scm.org
Thu Nov 7 05:29:16 EST 2019


Alphare added a comment.
Alphare marked 7 inline comments as done.


  Thanks for the review @kevincox.

INLINE COMMENTS

> kevincox wrote in status.rs:64
> I would create a helper function.
> 
>   fn mod_compare(a: i32, b: impl Into<i32>) -> bool {
>     let b  = b.into();
>     a != b && a != b & range_mask
>   }
> 
> Also I think the condition is easier to read as:
> 
>   a & i32::max_value() != b & i32::max_value()

See inline comment further in the series about how I went about this issue.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7254/new/

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

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


More information about the Mercurial-devel mailing list