about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2016-10-04 15:24:02 +0530
committerGitHub <noreply@github.com>2016-10-04 15:24:02 +0530
commite39a78a28ce7a66944f08c3cd12c0be0282d4827 (patch)
tree57e5042eb3f61644a128a47a66875dd69122b3a1
parent5a4ecb4a0cae6b7a63abb1abb112a15008fcce9c (diff)
parentbcac4861174c89b4c564dd1fdbebeee0873e6e81 (diff)
downloadrust-e39a78a28ce7a66944f08c3cd12c0be0282d4827.tar.gz
rust-e39a78a28ce7a66944f08c3cd12c0be0282d4827.zip
Rollup merge of #36878 - BlueSpaceCanary:book-dedup-cargo-run-intro, r=GuillaumeGomez
Avoid introducing `run` twice in the Rust book

As it stands, getting-started.md and guessing-game.md both introduce `run` as a new command. I switched it so that the 2nd refers back to the first introduction, rather than re-introducing the command.

(First ever FOSS PR, sorry if I screwed up anything obvious :) )

r? @steveklabnik
-rw-r--r--src/doc/book/getting-started.md3
-rw-r--r--src/doc/book/guessing-game.md9
2 files changed, 6 insertions, 6 deletions
diff --git a/src/doc/book/getting-started.md b/src/doc/book/getting-started.md
index 22db70e605b..5add2359282 100644
--- a/src/doc/book/getting-started.md
+++ b/src/doc/book/getting-started.md
@@ -505,6 +505,9 @@ $ cargo run
 Hello, world!
 ```
 
+The `run` command comes in handy when you need to rapidly iterate on a
+project.
+
 Notice that this example didn’t re-build the project. Cargo figured out that
 the file hasn’t changed, and so it just ran the binary. If you'd modified your
 source code, Cargo would have rebuilt the project before running it, and you
diff --git a/src/doc/book/guessing-game.md b/src/doc/book/guessing-game.md
index 22cf6068e4d..222597be0a9 100644
--- a/src/doc/book/guessing-game.md
+++ b/src/doc/book/guessing-game.md
@@ -56,9 +56,7 @@ $ cargo build
 Excellent! Open up your `src/main.rs` again. We’ll be writing all of
 our code in this file.
 
-Before we move on, let me show you one more Cargo command: `run`. `cargo run`
-is kind of like `cargo build`, but it also then runs the produced executable.
-Try it out:
+Remember the `run` command from last chapter? Try it out again here:
 
 ```bash
 $ cargo run
@@ -67,9 +65,8 @@ $ cargo run
 Hello, world!
 ```
 
-Great! The `run` command comes in handy when you need to rapidly iterate on a
-project. Our game is such a project, we need to quickly test each
-iteration before moving on to the next one.
+Great! Our game is just the kind of project `run` is good for: we need
+to quickly test each iteration before moving on to the next one.
 
 # Processing a Guess