diff --git a/rustbook-en/.github/workflows/main.yml b/rustbook-en/.github/workflows/main.yml index 34fc9ae0a..7aab3ca4f 100644 --- a/rustbook-en/.github/workflows/main.yml +++ b/rustbook-en/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: - name: Install mdbook run: | mkdir bin - 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 + 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 echo "$(pwd)/bin" >> "${GITHUB_PATH}" - name: Report versions run: | diff --git a/rustbook-en/listings/ch17-async-await/listing-17-12/src/main.rs b/rustbook-en/listings/ch17-async-await/listing-17-12/src/main.rs index c22b7d2d7..15cdf5548 100644 --- a/rustbook-en/listings/ch17-async-await/listing-17-12/src/main.rs +++ b/rustbook-en/listings/ch17-async-await/listing-17-12/src/main.rs @@ -23,7 +23,7 @@ fn main() { let rx_fut = async { while let Some(value) = rx.recv().await { - eprintln!("received '{value}'"); + println!("received '{value}'"); } }; diff --git a/rustbook-en/src/ch13-04-performance.md b/rustbook-en/src/ch13-04-performance.md index d9cc06f99..3889204de 100644 --- a/rustbook-en/src/ch13-04-performance.md +++ b/rustbook-en/src/ch13-04-performance.md @@ -14,10 +14,10 @@ test bench_search_for ... bench: 19,620,300 ns/iter (+/- 915,700) test bench_search_iter ... bench: 19,234,900 ns/iter (+/- 657,200) ``` -The iterator version was slightly faster! We won’t explain the benchmark code -here, because the point is not to prove that the two versions are equivalent -but to get a general sense of how these two implementations compare -performance-wise. +The two implementations have similar performance! We won’t explain the +benchmark code here, because the point is not to prove that the two versions +are equivalent but to get a general sense of how these two implementations +compare performance-wise. For a more comprehensive benchmark, you should check using various texts of various sizes as the `contents`, different words and words of different lengths diff --git a/rustbook-en/src/ch17-00-async-await.md b/rustbook-en/src/ch17-00-async-await.md index acd0ed376..a69fcccfc 100644 --- a/rustbook-en/src/ch17-00-async-await.md +++ b/rustbook-en/src/ch17-00-async-await.md @@ -1,4 +1,4 @@ -## Async and Await +# Async and Await Many operations we ask the computer to do can take a while to finish. For example, if you used a video editor to create a video of a family celebration, diff --git a/rustbook-en/src/ch20-03-advanced-traits.md b/rustbook-en/src/ch20-03-advanced-traits.md index 3b5b80728..58a2ff86a 100644 --- a/rustbook-en/src/ch20-03-advanced-traits.md +++ b/rustbook-en/src/ch20-03-advanced-traits.md @@ -55,7 +55,7 @@ the `Item` type is `u32`: This syntax seems comparable to that of generics. So why not just define the `Iterator` trait with generics, as shown in Listing 20-14? -+ ```rust,noplayground {{#rustdoc_include ../listings/ch20-advanced-features/listing-20-14/src/lib.rs}} diff --git a/rustbook-en/src/ch21-03-graceful-shutdown-and-cleanup.md b/rustbook-en/src/ch21-03-graceful-shutdown-and-cleanup.md index fc4fbada8..a58f4ddc6 100644 --- a/rustbook-en/src/ch21-03-graceful-shutdown-and-cleanup.md +++ b/rustbook-en/src/ch21-03-graceful-shutdown-and-cleanup.md @@ -74,7 +74,7 @@ So we need to update the `ThreadPool` `drop` implementation like this: -```rust,ignore,does_not_compile +```rust {{#rustdoc_include ../listings/ch21-web-server/no-listing-04-update-drop-definition/src/lib.rs:here}} ```