D7526: rust-hg-path: add method to get part of a path relative to a prefix

Alphare (Raphaël Gomès) phabricator at mercurial-scm.org
Wed Dec 11 03:42:45 EST 2019


Alphare added inline comments.

INLINE COMMENTS

> martinvonz wrote in hg_path.rs:438
> The argument order here feels backwards. I know some frameworks (like Java's JUnit) put the expected value first, but the definition of `assert_eq!` doesn't seem to have any opinion and https://doc.rust-lang.org/stable/rust-by-example/testing/unit_testing.html puts the actual value first. What do you think about changing the order? That would make it more readable to me.

It looks that I took the habit because the test runner in PyCharm that I used when starting with Rust prints `expected` and `actual` in that order. I can reverse it if you really think it's more readable this way.

REPOSITORY
  rHG Mercurial

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

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

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


More information about the Mercurial-devel mailing list