Skip to content

Commit

Permalink
fix(test1): Swap assertion parameter order
Browse files Browse the repository at this point in the history
`Expected` should come before `actual`, other wise it leads to confusing compiler messages, e.g.
```
note: expected type `()`
         found type `{integer}`
```
  • Loading branch information
petemcfarlane authored Jul 13, 2019
1 parent b8368de commit 4086d46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exercises/test1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ fn verify_test() {
let price1 = calculate_price(55);
let price2 = calculate_price(40);

assert_eq!(price1, 55);
assert_eq!(price2, 80);
assert_eq!(55, price1);
assert_eq!(80, price2);
}

0 comments on commit 4086d46

Please sign in to comment.