Skip to content

Commit

Permalink
update original
Browse files Browse the repository at this point in the history
  • Loading branch information
funkill committed Jan 7, 2025
1 parent f88ccd3 commit 0d5ffe2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion rustbook-en/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fn main() {

let rx_fut = async {
while let Some(value) = rx.recv().await {
eprintln!("received '{value}'");
println!("received '{value}'");
}
};

Expand Down
8 changes: 4 additions & 4 deletions rustbook-en/src/ch13-04-performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rustbook-en/src/ch17-00-async-await.md
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion rustbook-en/src/ch20-03-advanced-traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?

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

```rust,noplayground
{{#rustdoc_include ../listings/ch20-advanced-features/listing-20-14/src/lib.rs}}
Expand Down
2 changes: 1 addition & 1 deletion rustbook-en/src/ch21-03-graceful-shutdown-and-cleanup.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ So we need to update the `ThreadPool` `drop` implementation like this:

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

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

Expand Down

0 comments on commit 0d5ffe2

Please sign in to comment.