rust-pretty-assertions icon indicating copy to clipboard operation
rust-pretty-assertions copied to clipboard

Allow optional argument names (replacing "left"/"right")

Open rivy opened this issue 5 years ago • 0 comments

"left" and "right" are semantically neutral labels. In many cases, it would be easier to understand what is actually failing if the labels could be changed to a something with more meaning (eg, "expect" and "actual"). An example proposed use and output ...

assert_eq!( expect: [1, 2, 4], actual: [1, 2, 8]);

thread 'main' panicked at 'assertion failed: `(expect == actual)`

Diff < expect / actual > :
 [
     1,
     2,
<    4,
>    8,
 ]
' ...

rivy avatar Jan 01 '20 17:01 rivy