Changes from nostarch to go back to "we" in some cases

This commit is contained in:
Carol (Nichols || Goulding) 2016-10-11 09:05:33 -04:00
parent a822f470d1
commit 57bbf4e7ef

View File

@ -4,7 +4,7 @@ Lets jump into Rust by working on a hands-on project! This chapter introduces
you to a few common Rust concepts by showing you how to use them in a real you to a few common Rust concepts by showing you how to use them in a real
program. Youll learn about `let`, `match`, methods, associated functions, using program. Youll learn about `let`, `match`, methods, associated functions, using
external crates, and more! The following chapters will explore these ideas in external crates, and more! The following chapters will explore these ideas in
more detail. In this chapter, youll practice the fundamentals. more detail: in this chapter, youll practice the fundamentals.
Youll implement a classic beginner programming problem: a guessing game. Youll implement a classic beginner programming problem: a guessing game.
Heres how it works: the program will generate a random integer between 1 and Heres how it works: the program will generate a random integer between 1 and
@ -14,16 +14,16 @@ game will congratulate you.
## Setting Up a New Project ## Setting Up a New Project
To set up a new project, go to the projects directory that you created in To set up a new project, go to your projects directory that you established in
Chapter 1, and make a new project using Cargo, like so: Chapter 1, and create a new project using Cargo, like so:
```bash ```bash
$ cargo new guessing_game --bin $ cargo new guessing_game --bin
$ cd guessing_game $ cd guessing_game
``` ```
Pass the name of your project to `cargo new` and use the `--bin` flag, because We pass the name of our project to `cargo new` and pass the `--bin` flag,
youll be making another binary similar to the one in Chapter 1. because well be making another binary similar to the one in Chapter 1.
Look at the generated `Cargo.toml` file: Look at the generated `Cargo.toml` file:
@ -52,8 +52,8 @@ fn main() {
} }
``` ```
Now lets compile this “Hello, world!” program and run it in the same step Now lets compile what Cargo gave us and run it in the same step using the
using the `cargo run` command: `cargo run` command:
```bash ```bash
$ cargo run $ cargo run
@ -63,8 +63,8 @@ Hello, world!
``` ```
The `run` command comes in handy when you need to rapidly iterate on a project, The `run` command comes in handy when you need to rapidly iterate on a project,
and this game is such a project: you should quickly test each iteration before and this game is such a project: we want to quickly test each iteration
moving on to the next one. before moving on to the next one.
Reopen the `src/main.rs` file. Youll be writing all your code in this file. Reopen the `src/main.rs` file. Youll be writing all your code in this file.