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
This commit is contained in:
Manish Goregaokar 2016-10-04 15:24:02 +05:30 committed by GitHub
commit e39a78a28c
2 changed files with 6 additions and 6 deletions

View file

@ -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 didnt re-build the project. Cargo figured out that
the file hasnt 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

View file

@ -56,9 +56,7 @@ $ cargo build
Excellent! Open up your `src/main.rs` again. Well 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