1
0
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:
Ibrahim Ahmad (feyroozecode) 2023-12-21 16:50:02 +01:00 committed by GitHub
parent a99a86dc50
commit e1d98521bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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