Skip to content

Commit

Permalink
match isn't really an operator. Fixes #2859
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed Jan 4, 2022
1 parent b4a8e23 commit 7fba4f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions nostarch/chapter06.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,9 @@ just this when used with enums: it will run different code depending on which
variant of the enum it has, and that code can use the data inside the matching
value.

## The `match` Control Flow Operator
## The `match` Control Flow Construct

Rust has an extremely powerful control flow operator called `match` that allows
Rust has an extremely powerful control flow construct called `match` that allows
you to compare a value against a series of patterns and then execute code based
on which pattern matches. Patterns can be made up of literal values, variable
names, wildcards, and many other things; Chapter 18 covers all the different
Expand Down
2 changes: 1 addition & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

- [Enums and Pattern Matching](ch06-00-enums.md)
- [Defining an Enum](ch06-01-defining-an-enum.md)
- [The `match` Control Flow Operator](ch06-02-match.md)
- [The `match` Control Flow Construct](ch06-02-match.md)
- [Concise Control Flow with `if let`](ch06-03-if-let.md)

## Basic Rust Literacy
Expand Down
5 changes: 3 additions & 2 deletions src/ch06-02-match.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## The `match` Control Flow Operator
<a id="the-match-control-flow-operator"></a>
## The `match` Control Flow Construct

Rust has an extremely powerful control flow operator called `match` that allows
Rust has an extremely powerful control flow construct called `match` that allows
you to compare a value against a series of patterns and then execute code based
on which pattern matches. Patterns can be made up of literal values, variable
names, wildcards, and many other things; Chapter 18 covers all the different
Expand Down

0 comments on commit 7fba4f3

Please sign in to comment.