Skip to content

Commit e8bb1fa

Browse files
author
gaoyuan
committed
fix lint error by refactoring to use the Listing component
1 parent d5de02e commit e8bb1fa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

0 commit comments

Comments
 (0)