Skip to content

Commit bfe46a5

Browse files
authored
rust: leap approach fixes (#1625)
1 parent cee5a1e commit bfe46a5

File tree

1 file changed

+2
-2
lines changed
  • exercises/practice/leap/.approaches/match-on-a-tuple

1 file changed

+2
-2
lines changed

exercises/practice/leap/.approaches/match-on-a-tuple/content.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ A [tuple][tuple] is made from the conditions for the year being evenly divisible
2222
This is similar to `default` used in `switch` statements in other languages.
2323
It returns `false` no matter what the values in the tuple are.
2424

25-
| year | year % 4 | year % 100 | year % 400 == 0 | is leap year |
25+
| year | year % 4 | year % 100 | year % 400 | is leap year |
2626
| ---- | -------- | ---------- | --------------- | ------------ |
2727
| 2020 | 0 | 20 | 20 | true |
2828
| 2019 | 3 | 19 | 19 | false |
29-
| 2020 | 0 | 0 | 0 | true |
29+
| 2000 | 0 | 0 | 0 | true |
3030
| 1900 | 0 | 0 | 300 | false |
3131

3232
Although some may consider it to be a more "functional" approach, the `switch` on a `tuple` approach is somewhat more verbose than other approaches,

0 commit comments

Comments
 (0)