Section 18.1 on pattern matching mentions that .. could be used to ignore values:
To fix the error, we could ignore one or more of the values in the tuple using _ or .., as you’ll see in the “Ignoring Values in a Pattern” section. If the problem is that we have too many variables in the pattern, the solution is to make the types match by removing variables so the number of variables equals the number of elements in the tuple.
and the quiz at the end of the section quizzes you on the .. match-ignoring syntax:
main
branch to see if this has already been fixedURL to the section(s) of the book with this problem:
https://github.com/cognitive-engineering-lab/rust-book/blob/1537ac115e08f2945e98c6a6664f0b4bfdbc75e4/src/ch18-01-all-the-places-for-patterns.md?plain=1#L205
Description of the problem:
Section 18.1 on pattern matching mentions that
..
could be used to ignore values:and the quiz at the end of the section quizzes you on the
..
match-ignoring syntax:https://github.com/cognitive-engineering-lab/rust-book/blob/1537ac115e08f2945e98c6a6664f0b4bfdbc75e4/quizzes/ch18-01-all-the-places-for-patterns.toml#L16
but the
..
syntax is not explained until section 18.3:https://github.com/cognitive-engineering-lab/rust-book/blob/1537ac115e08f2945e98c6a6664f0b4bfdbc75e4/src/ch18-03-pattern-syntax.md?plain=1#L387
Suggested fix:
Move the quiz on
..
to after section 18.3, or move the explanation of..
into section 18.1.