You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e5db46b
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: c-cpp-book/src/ch06-enums-and-pattern-matching.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ fn main() {
26
26
- The Rust ```match``` is the equivalent of the C "switch" on steroids
27
27
-```match``` can be used for pattern matching on simple data types, ```struct```, ```enum```
28
28
- The ```match``` statement must be exhaustive, i.e., they must cover all possible cases for a given ```type```. The ```_``` can be used a wildcard for the "all else" case
29
-
-```match``` can yield a value, but all arms (```=>```) of must return a value of the same type
29
+
-```match``` can yield a value, but all arms (```=>```) must return a value of the same type
0 commit comments