about summary refs log tree commit diff
path: root/src/doc/trpl
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-05-17 11:55:38 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-05-17 11:55:38 +0530
commita25925a3d44f3a954b23904c65837e84161beb41 (patch)
treec01a48746d8eca5d47f52abb22c4081c287cb15e /src/doc/trpl
parente06eb1c73338507ea14839a850377579b376b4c9 (diff)
parentd5394d00d14335cf729aa87dfe6af77254633223 (diff)
downloadrust-a25925a3d44f3a954b23904c65837e84161beb41.tar.gz
rust-a25925a3d44f3a954b23904c65837e84161beb41.zip
Rollup merge of #25472 - WillEngler:book-tiny-typo-fixes, r=alexcrichton
This PR fixes two little typos in the Dining Philosophers example.

Also, there are two style points that may have been oversights but may have been deliberate, so I'll just bring them up here:

1) In the last paragraph, you say

> You’ll notice we can introduce a new binding to `table` here, and it will shadow the old one. This is often used so that you don’t need to come up with two unique names.

You already said something similar to this in the Guessing Game, but maybe you intended for this example to be independent of that one.

2) In "Rust Inside Other Languages," you introduce the idea of the "global interpreter lock" and then refer to it as the GIL a few paragraphs later without explicitly stating that GIL == global interpreter lock. It's reasonable to expect readers to make the connection, but maybe that's not what you intended.

Excellent work on the examples! Congrats on 1.0!

r? @steveklabnik
Diffstat (limited to 'src/doc/trpl')
-rw-r--r--src/doc/trpl/dining-philosophers.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/trpl/dining-philosophers.md b/src/doc/trpl/dining-philosophers.md
index b179c90ceb9..035f4de9da2 100644
--- a/src/doc/trpl/dining-philosophers.md
+++ b/src/doc/trpl/dining-philosophers.md
@@ -320,7 +320,7 @@ from the standard library, and so we need to `use` it.
 We now print out two messages, with a `sleep_ms()` in the middle. This will
 simulate the time it takes a philosopher to eat.
 
-If you run this program, You should see each philosopher eat in turn:
+If you run this program, you should see each philosopher eat in turn:
 
 ```text
 Baruch Spinoza is eating.
@@ -480,7 +480,7 @@ struct Table {
 }
 ```
 
-This `Table` has an vector of `Mutex`es. A mutex is a way to control
+This `Table` has a vector of `Mutex`es. A mutex is a way to control
 concurrency: only one thread can access the contents at once. This is exactly
 the property we need with our forks. We use an empty tuple, `()`, inside the
 mutex, since we’re not actually going to use the value, just hold onto it.