Skip to content

Commit 2480600

Browse files
author
gaoyuan
committed
fix lint errors
1 parent 89fe9cb commit 2480600

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

src/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ separated by double colons (`::`).
1717

1818
Returning to [Listing 7-1](ch07-02-defining-modules-to-control-scope-and-privacy.md#listing-7-1), say we want to call the `add_to_waitlist` function.
1919
This is the same as asking: what’s the path of the `add_to_waitlist` function?
20-
[Listing 7-3](#listing-7-3) contains [Listing 7-1](#listing-7-1) with some of the modules and functions
20+
[Listing 7-3](#listing-7-3) contains [Listing 7-1](ch07-02-defining-modules-to-control-scope-and-privacy.md#listing-7-1) with some of the modules and functions
2121
removed.
2222

2323
We’ll show two ways to call the `add_to_waitlist` function from a new function,

src/ch13-03-improving-our-io-project.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ the same thing for the `file_path` value.
118118
### Making Code Clearer with Iterator Adapters
119119

120120
We can also take advantage of iterators in the `search` function in our I/O
121-
project, which is reproduced here in [Listing 13-21](#listing-13-21) as it was in [Listing 12-19](#listing-12-19):
121+
project, which is reproduced here in [Listing 13-21](#listing-13-21) as it was in [Listing 12-19](ch12-04-testing-the-librarys-functionality.md#listing-12-19):
122122

123123
<Listing number="13-21" file-name="src/lib.rs" caption="The implementation of the `search` function from [Listing 12-19](ch12-04-testing-the-librarys-functionality.md#listing-12-19)">
124124

src/ch16-02-message-passing.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,13 @@ First, in [Listing 16-6](#listing-16-6), we’ll create a channel but not do any
3232
Note that this won’t compile yet because Rust can’t tell what type of values we
3333
want to send over the channel.
3434

35-
<span class="filename">Filename: src/main.rs</span>
35+
<Listing number="16-6" file-name="src/main.rs" caption="Creating a channel and assigning the two halves to `tx` and `rx`">
3636

3737
```rust,ignore,does_not_compile
3838
{{#rustdoc_include ../listings/ch16-fearless-concurrency/listing-16-06/src/main.rs}}
3939
```
4040

41-
<span class="caption">[Listing 16-6](#listing-16-6): Creating a channel and assigning the two
42-
halves to `tx` and `rx`</span>
41+
</Listing>
4342

4443
We create a new channel using the `mpsc::channel` function; `mpsc` stands for
4544
_multiple producer, single consumer_. In short, the way Rust’s standard library

src/ch19-03-pattern-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ and the `y` axis, this code would only print `On the x axis at 0`.
187187
We've destructured enums in this book (for example, [Listing 6-5](ch06-02-match.md#listing-6-5) in Chapter 6),
188188
but haven’t yet explicitly discussed that the pattern to destructure an enum
189189
corresponds to the way the data stored within the enum is defined. As an
190-
example, in [Listing 19-15](#listing-19-15) we use the `Message` enum from [Listing 6-2](#listing-6-2) and write
190+
example, in [Listing 19-15](#listing-19-15) we use the `Message` enum from [Listing 6-2](ch06-01-defining-an-enum.md#listing-6-2) and write
191191
a `match` with patterns that will destructure each inner value.
192192

193193
<Listing number="19-15" file-name="src/main.rs" caption="Destructuring enum variants that hold different kinds of values">

0 commit comments

Comments
 (0)