Skip to content

Commit f78ab89

Browse files
committed
Consistently use let...else
1 parent 646355a commit f78ab89

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
- [Enums and Pattern Matching](ch06-00-enums.md)
3232
- [Defining an Enum](ch06-01-defining-an-enum.md)
3333
- [The `match` Control Flow Construct](ch06-02-match.md)
34-
- [Concise Control Flow with `if let` and `let else`](ch06-03-if-let.md)
34+
- [Concise Control Flow with `if let` and `let...else`](ch06-03-if-let.md)
3535

3636
- [Packages, Crates, and Modules](ch07-00-managing-growing-projects-with-packages-crates-and-modules.md)
3737
- [Packages and Crates](ch07-01-packages-and-crates.md)

src/ch06-03-if-let.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Concise Control Flow with `if let` and `let else`
1+
## Concise Control Flow with `if let` and `let...else`
22

33
The `if let` syntax lets you combine `if` and `let` into a less verbose way to
44
handle values that match one pattern while ignoring the rest. Consider the

src/ch17-02-concurrency-with-async.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ synchronous channel. Rust doesn’t yet have a way to use a `for` loop with an
255255
_asynchronously produced_ series of items, however, so we need to use a loop we
256256
haven’t seen before: the `while let` conditional loop. This is the loop version
257257
of the `if let` construct we saw back in the [“Concise Control Flow with `if
258-
let` and `let else`”][if-let]<!-- ignore --> section in Chapter 6. The loop
258+
let` and `let...else`”][if-let]<!-- ignore --> section in Chapter 6. The loop
259259
will continue executing as long as the pattern it specifies continues to match
260260
the value.
261261

src/ch19-02-refutability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pattern `Some(x)`, Rust rightfully produces a compiler error.
5050

5151
If we have a refutable pattern where an irrefutable pattern is needed, we can
5252
fix it by changing the code that uses the pattern: Instead of using `let`, we
53-
can use `let else`. Then, if the pattern doesn’t match, the code in the curly
53+
can use `let...else`. Then, if the pattern doesn’t match, the code in the curly
5454
brackets will handle the value. Listing 19-9 shows how to fix the code in
5555
Listing 19-8.
5656

0 commit comments

Comments
 (0)