Skip to content

Commit b4674bc

Browse files
committed
... range patterns are deprecated
1 parent d90bbb7 commit b4674bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/flow_control/match/binding.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ fn main() {
1515
1616
match age() {
1717
0 => println!("I'm not born yet I guess"),
18-
// Could `match` 1 ... 12 directly but then what age
18+
// Could `match` 1 ..= 12 directly but then what age
1919
// would the child be? Instead, bind to `n` for the
20-
// sequence of 1 .. 12. Now the age can be reported.
20+
// sequence of 1 ..= 12. Now the age can be reported.
2121
n @ 1 ..= 12 => println!("I'm a child of age {:?}", n),
2222
n @ 13 ..= 19 => println!("I'm a teen of age {:?}", n),
2323
// Nothing bound. Return the result.

0 commit comments

Comments
 (0)