Skip to content

Commit 0d5ffe2

Browse files
committed
update original
1 parent f88ccd3 commit 0d5ffe2

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

rustbook-en/.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Install mdbook
1818
run: |
1919
mkdir bin
20-
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.21/mdbook-v0.4.21-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
20+
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.37/mdbook-v0.4.37-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
2121
echo "$(pwd)/bin" >> "${GITHUB_PATH}"
2222
- name: Report versions
2323
run: |

rustbook-en/listings/ch17-async-await/listing-17-12/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn main() {
2323

2424
let rx_fut = async {
2525
while let Some(value) = rx.recv().await {
26-
eprintln!("received '{value}'");
26+
println!("received '{value}'");
2727
}
2828
};
2929

rustbook-en/src/ch13-04-performance.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ test bench_search_for ... bench: 19,620,300 ns/iter (+/- 915,700)
1414
test bench_search_iter ... bench: 19,234,900 ns/iter (+/- 657,200)
1515
```
1616

17-
The iterator version was slightly faster! We won’t explain the benchmark code
18-
here, because the point is not to prove that the two versions are equivalent
19-
but to get a general sense of how these two implementations compare
20-
performance-wise.
17+
The two implementations have similar performance! We won’t explain the
18+
benchmark code here, because the point is not to prove that the two versions
19+
are equivalent but to get a general sense of how these two implementations
20+
compare performance-wise.
2121

2222
For a more comprehensive benchmark, you should check using various texts of
2323
various sizes as the `contents`, different words and words of different lengths

rustbook-en/src/ch17-00-async-await.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Async and Await
1+
# Async and Await
22

33
Many operations we ask the computer to do can take a while to finish. For
44
example, if you used a video editor to create a video of a family celebration,

rustbook-en/src/ch20-03-advanced-traits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ the `Item` type is `u32`:
5555
This syntax seems comparable to that of generics. So why not just define the
5656
`Iterator` trait with generics, as shown in Listing 20-14?
5757

58-
<Listing number="20-14" number="A hypothetical definition of the `Iterator` trait using generics">
58+
<Listing number="20-14" caption="A hypothetical definition of the `Iterator` trait using generics">
5959

6060
```rust,noplayground
6161
{{#rustdoc_include ../listings/ch20-advanced-features/listing-20-14/src/lib.rs}}

rustbook-en/src/ch21-03-graceful-shutdown-and-cleanup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ So we need to update the `ThreadPool` `drop` implementation like this:
7474

7575
<Listing file-name="src/lib.rs">
7676

77-
```rust,ignore,does_not_compile
77+
```rust
7878
{{#rustdoc_include ../listings/ch21-web-server/no-listing-04-update-drop-definition/src/lib.rs:here}}
7979
```
8080

0 commit comments

Comments
 (0)