mirror of
https://github.com/google/comprehensive-rust.git
synced 2024-12-15 22:37:28 +02:00
Update match.md (#1595)
correct a little errors --------- Co-authored-by: Dustin J. Mitchell <dustin@v.igoro.us>
This commit is contained in:
parent
a99a86dc50
commit
e1d98521bb
@ -26,7 +26,7 @@ The `_` pattern is a wildcard pattern which matches any value. The expressions
|
||||
_must_ be irrefutable, meaning that it covers every possibility, so `_` is
|
||||
often used as the final catch-all case.
|
||||
|
||||
Match can be used as an expression. Just like like `if`, each match arm must have the same type. The type is the last
|
||||
Match can be used as an expression. Just like `if`, each match arm must have the same type. The type is the last
|
||||
expression of the block, if any. In the example above, the type is `()`.
|
||||
|
||||
A variable in the pattern (`key` in this example) will create a binding that
|
||||
|
Loading…
Reference in New Issue
Block a user