summaryrefslogtreecommitdiffstats
path: root/src/doc/book
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/book')
-rw-r--r--src/doc/book/2018-edition/book.toml2
-rw-r--r--src/doc/book/2018-edition/src/theme/2018-edition.css9
-rw-r--r--src/doc/book/2018-edition/src/theme/index.hbs37
-rw-r--r--src/doc/book/listings/ch20-web-server/listing-20-24/src/lib.rs4
-rw-r--r--src/doc/book/src/ch01-03-hello-cargo.md2
-rw-r--r--src/doc/book/src/ch06-02-match.md2
-rw-r--r--src/doc/book/src/ch09-02-recoverable-errors-with-result.md2
-rw-r--r--src/doc/book/src/ch20-02-multithreaded.md2
-rw-r--r--src/doc/book/src/title-page.md4
9 files changed, 13 insertions, 51 deletions
diff --git a/src/doc/book/2018-edition/book.toml b/src/doc/book/2018-edition/book.toml
index 9c71e2a91..03b59090b 100644
--- a/src/doc/book/2018-edition/book.toml
+++ b/src/doc/book/2018-edition/book.toml
@@ -3,5 +3,5 @@ title = "The Rust Programming Language"
author = "Steve Klabnik and Carol Nichols, with Contributions from the Rust Community"
[output.html]
-additional-css = ["ferris.css", "src/theme/2018-edition.css"]
+additional-css = ["ferris.css"]
additional-js = ["ferris.js"]
diff --git a/src/doc/book/2018-edition/src/theme/2018-edition.css b/src/doc/book/2018-edition/src/theme/2018-edition.css
deleted file mode 100644
index b1dcf9364..000000000
--- a/src/doc/book/2018-edition/src/theme/2018-edition.css
+++ /dev/null
@@ -1,9 +0,0 @@
-span.caption {
- font-size: .8em;
- font-weight: 600;
-}
-
-span.caption code {
- font-size: 0.875em;
- font-weight: 400;
-}
diff --git a/src/doc/book/2018-edition/src/theme/index.hbs b/src/doc/book/2018-edition/src/theme/index.hbs
deleted file mode 100644
index f3f1b52fa..000000000
--- a/src/doc/book/2018-edition/src/theme/index.hbs
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="{{ language }}" class="no-js">
- <head>
- <!-- Book generated using mdBook -->
- <meta charset="UTF-8">
- <title>Outdated link: {{ title }}</title>
- <meta name="robots" content="noindex,follow">
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
-
- <base href="{{ path_to_root }}">
-
- <link rel="stylesheet" href="book.css">
- <link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
- <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
-
- <link rel="stylesheet" href="highlight.css">
- <link rel="stylesheet" href="tomorrow-night.css">
- <link rel="stylesheet" href="ayu-highlight.css">
-
- <!-- Custom theme stylesheets -->
- {{#each additional_css}}
- <link rel="stylesheet" href="{{this}}">
- {{/each}}
- </head>
- <body class="light">
- <div id="page-wrapper" class="page-wrapper">
- <div class="page">
- {{> header}}
- <div id="content" class="content">
- <main>
- {{{ content }}}
- </main>
- </div>
- </div>
- </div>
- </body>
-</html>
diff --git a/src/doc/book/listings/ch20-web-server/listing-20-24/src/lib.rs b/src/doc/book/listings/ch20-web-server/listing-20-24/src/lib.rs
index 55e8fef8f..28c0dea26 100644
--- a/src/doc/book/listings/ch20-web-server/listing-20-24/src/lib.rs
+++ b/src/doc/book/listings/ch20-web-server/listing-20-24/src/lib.rs
@@ -70,7 +70,9 @@ struct Worker {
impl Worker {
fn new(id: usize, receiver: Arc<Mutex<mpsc::Receiver<Job>>>) -> Worker {
let thread = thread::spawn(move || loop {
- match receiver.lock().unwrap().recv() {
+ let message = receiver.lock().unwrap().recv();
+
+ match message {
Ok(job) => {
println!("Worker {id} got a job; executing.");
diff --git a/src/doc/book/src/ch01-03-hello-cargo.md b/src/doc/book/src/ch01-03-hello-cargo.md
index 135eacd2f..9979e76dd 100644
--- a/src/doc/book/src/ch01-03-hello-cargo.md
+++ b/src/doc/book/src/ch01-03-hello-cargo.md
@@ -66,6 +66,8 @@ name = "hello_cargo"
version = "0.1.0"
edition = "2021"
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
[dependencies]
```
diff --git a/src/doc/book/src/ch06-02-match.md b/src/doc/book/src/ch06-02-match.md
index a24936829..2dfe6c34b 100644
--- a/src/doc/book/src/ch06-02-match.md
+++ b/src/doc/book/src/ch06-02-match.md
@@ -17,7 +17,7 @@ the value falls into the associated code block to be used during execution.
Speaking of coins, let’s use them as an example using `match`! We can write a
function that takes an unknown United States coin and, in a similar way as the
-counting machine, determines which coin it is and return its value in cents, as
+counting machine, determines which coin it is and returns its value in cents, as
shown here in Listing 6-3.
```rust
diff --git a/src/doc/book/src/ch09-02-recoverable-errors-with-result.md b/src/doc/book/src/ch09-02-recoverable-errors-with-result.md
index 61931f08d..347ef9aa7 100644
--- a/src/doc/book/src/ch09-02-recoverable-errors-with-result.md
+++ b/src/doc/book/src/ch09-02-recoverable-errors-with-result.md
@@ -524,7 +524,7 @@ returns integers from executables to be compatible with this convention.
The `main` function may return any types that implement [the
`std::process::Termination` trait][termination]<!-- ignore -->, which contains
-a function `report` that returns an `ExitCode` Consult the standard library
+a function `report` that returns an `ExitCode`. Consult the standard library
documentation for more information on implementing the `Termination` trait for
your own types.
diff --git a/src/doc/book/src/ch20-02-multithreaded.md b/src/doc/book/src/ch20-02-multithreaded.md
index bd1dc25ab..5a4a50ac0 100644
--- a/src/doc/book/src/ch20-02-multithreaded.md
+++ b/src/doc/book/src/ch20-02-multithreaded.md
@@ -387,7 +387,7 @@ this data structure *Worker*, which is a common term in pooling
implementations. The Worker picks up code that needs to be run and runs the
code in the Worker’s thread. Think of people working in the kitchen at a
restaurant: the workers wait until orders come in from customers, and then
-they’re responsible for taking those orders and filling them.
+they’re responsible for taking those orders and fulfilling them.
Instead of storing a vector of `JoinHandle<()>` instances in the thread pool,
we’ll store instances of the `Worker` struct. Each `Worker` will store a single
diff --git a/src/doc/book/src/title-page.md b/src/doc/book/src/title-page.md
index 47226dc84..ed55a6839 100644
--- a/src/doc/book/src/title-page.md
+++ b/src/doc/book/src/title-page.md
@@ -20,3 +20,7 @@ Press][nsprust].
[editions]: appendix-05-editions.html
[nsprust]: https://nostarch.com/rust
[translations]: appendix-06-translation.html
+
+> **🚨 Want a more interactive learning experience? Try out a different version
+> of the Rust Book, featuring: quizzes, highlighting, visualizations, and
+> more**: <https://rust-book.cs.brown.edu>