Skip to content

Commit

Permalink
Merge pull request #4037 from rust-lang/async-chapter
Browse files Browse the repository at this point in the history
Chapter 17: Async and Await
  • Loading branch information
chriskrycho authored Oct 9, 2024
2 parents 3401154 + 859c4e0 commit 68b4d35
Show file tree
Hide file tree
Showing 822 changed files with 95,312 additions and 6,110 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,19 @@ jobs:
rustup --version
rustc -Vv
mdbook --version
# mdBook does not currently have particularly good support for “external”
# crates. To make the test suite work correctly with `trpl`, we must first
# build `trpl` itself (`mdbook` will not do it), and then explicitly pass
# its `deps` path as a library search path for `mdbook test`. That will make
# sure all the crates can be resolved when running the tests.
- name: Build `trpl` crate
run: |
cd packages/trpl
cargo build
- name: Run tests
run: mdbook test
run:
mdbook test --library-path packages/trpl/target/debug/deps
package_tests:
name: Run package tests
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions 2018-edition/src/ch17-00-oop.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch17-00-oop.html) instead.
version of the book](../ch18-00-oop.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-00-oop.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-00-oop.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch17-01-what-is-oo.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch17-01-what-is-oo.html) instead.
version of the book](../ch18-01-what-is-oo.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-01-what-is-oo.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-01-what-is-oo.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch17-02-trait-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch17-02-trait-objects.html) instead.
version of the book](../ch18-02-trait-objects.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-02-trait-objects.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-02-trait-objects.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch17-03-oo-design-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch17-03-oo-design-patterns.html) instead.
version of the book](../ch19-03-oo-design-patterns.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-03-oo-design-patterns.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-03-oo-design-patterns.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch18-00-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch18-00-patterns.html) instead.
version of the book](../ch19-00-patterns.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-00-patterns.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-00-patterns.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch18-01-all-the-places-for-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch18-01-all-the-places-for-patterns.html) instead.
version of the book](../ch19-01-all-the-places-for-patterns.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-01-all-the-places-for-patterns.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-01-all-the-places-for-patterns.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch18-02-refutability.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch18-02-refutability.html) instead.
version of the book](../ch19-02-refutability.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-02-refutability.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-02-refutability.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch18-03-pattern-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch18-03-pattern-syntax.html) instead.
version of the book](../ch19-03-pattern-syntax.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-03-pattern-syntax.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-03-pattern-syntax.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch19-00-advanced-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch19-00-advanced-features.html) instead.
version of the book](../ch20-00-advanced-features.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-00-advanced-features.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-00-advanced-features.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch19-01-unsafe-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch19-01-unsafe-rust.html) instead.
version of the book](../ch20-01-unsafe-rust.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-01-unsafe-rust.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-01-unsafe-rust.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch19-03-advanced-traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch19-03-advanced-traits.html) instead.
version of the book](../ch20-03-advanced-traits.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-03-advanced-traits.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-03-advanced-traits.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch19-04-advanced-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch19-04-advanced-types.html) instead.
version of the book](../ch20-04-advanced-types.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-04-advanced-types.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-04-advanced-types.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch19-05-advanced-functions-and-closures.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch19-05-advanced-functions-and-closures.html) instead.
version of the book](../ch20-05-advanced-functions-and-closures.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-05-advanced-functions-and-closures.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-05-advanced-functions-and-closures.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch19-06-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch19-06-macros.html) instead.
version of the book](../ch20-06-macros.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-06-macros.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch19-06-macros.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch20-00-final-project-a-web-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-00-final-project-a-web-server.html) instead.
version of the book](../ch21-00-final-project-a-web-server.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch20-00-final-project-a-web-server.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch20-00-final-project-a-web-server.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch20-01-single-threaded.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-01-single-threaded.html) instead.
version of the book](../ch21-01-single-threaded.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch20-01-single-threaded.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch20-01-single-threaded.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch20-02-multithreaded.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-02-multithreaded.html) instead.
version of the book](../ch21-02-multithreaded.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch20-02-multithreaded.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch20-02-multithreaded.html).
4 changes: 2 additions & 2 deletions 2018-edition/src/ch20-03-graceful-shutdown-and-cleanup.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-03-graceful-shutdown-and-cleanup.html) instead.
version of the book](../ch21-03-graceful-shutdown-and-cleanup.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch20-03-graceful-shutdown-and-cleanup.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch20-03-graceful-shutdown-and-cleanup.html).
36 changes: 18 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exclude = [
"linkchecker", # linkchecker is part of the CI workflow
"listings", # these are intentionally distinct from the workspace
"tmp", # listings are built here when updating output via tools/update-rustc.sh
"packages/trpl", # manages its own dependencies as a standalone crate

# These are used as path dependencies in `rust-lang/rust` (since we are not
# publishing them to crates.io), so they cannot be part of this workspace,
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ $ start chrome.exe .\book\index.html # Windows (Cmd)
To run the tests:

```bash
$ mdbook test
$ cd packages/trpl
$ mdbook test --library-path packages/trpl/target/debug/deps
```

## Contributing
Expand Down
Loading

0 comments on commit 68b4d35

Please sign in to comment.