mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
work -> compile in Guessing Game
'work' can refer to the game itself, ie, 'this compiles but the game isn't finished,' so 'compile' is a more clear way to describe the problem. Thanks jhun on irc
This commit is contained in:
parent
d03456183e
commit
db1f17a64b
@ -533,7 +533,7 @@ Great! Next up: let’s compare our guess to the secret guess.
|
|||||||
# Comparing guesses
|
# Comparing guesses
|
||||||
|
|
||||||
Now that we’ve got user input, let’s compare our guess to the random guess.
|
Now that we’ve got user input, let’s compare our guess to the random guess.
|
||||||
Here’s our next step, though it doesn’t quite work yet:
|
Here’s our next step, though it doesn’t quite compile yet:
|
||||||
|
|
||||||
```rust,ignore
|
```rust,ignore
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
@ -617,7 +617,7 @@ match guess.cmp(&secret_number) {
|
|||||||
If it’s `Less`, we print `Too small!`, if it’s `Greater`, `Too big!`, and if
|
If it’s `Less`, we print `Too small!`, if it’s `Greater`, `Too big!`, and if
|
||||||
`Equal`, `You win!`. `match` is really useful, and is used often in Rust.
|
`Equal`, `You win!`. `match` is really useful, and is used often in Rust.
|
||||||
|
|
||||||
I did mention that this won’t quite work yet, though. Let’s try it:
|
I did mention that this won’t quite compile yet, though. Let’s try it:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cargo build
|
$ cargo build
|
||||||
|
Loading…
Reference in New Issue
Block a user