Skip to content

Commit 64a234a

Browse files
committed
fix typos
1 parent 55acb0b commit 64a234a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

text/3637-guard-patterns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ match user.subscription_plan() {
4747
}
4848
```
4949

50-
Now we have just one arm for a successful transaction, with an or-pattern combining the two arms we used to have. The patterns two nested patterns are of the form
50+
Now we have just one arm for a successful transaction, with an or-pattern combining the two arms we used to have. The two nested patterns are of the form
5151

5252
```rust
5353
pattern if expr
@@ -188,7 +188,7 @@ match order {
188188
}
189189
```
190190

191-
Here, the pattern `customer if customer.subscription_plan() == Plan::Premium` has a clear meaning: it matches customers with premium subscriptions. All of the behavior of the pattern pertaining to the customer is in one place. However, if we move the guard outwards to wrap the entire order, the behavior is spread out and much harder to understand -- particularly if other its merged with conditions for other parts of the order:
191+
Here, the pattern `customer if customer.subscription_plan() == Plan::Premium` has a clear meaning: it matches customers with premium subscriptions. All of the behavior of the pattern pertaining to the customer is in one place. However, if we move the guard outwards to wrap the entire order, the behavior is spread out and much harder to understand -- particularly if it is merged with conditions for other parts of the order struct:
192192

193193
```rust
194194
// The same match statement using or-of-guards.

0 commit comments

Comments
 (0)