Skip to content

Correct initial guessing game example. Fixes #25147. r? @steveklabnik #25148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/doc/trpl/guessing-game.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fn main() {
.ok()
.expect("Failed to read line");

println!("You guessed: {}", input);
println!("You guessed: {}", guess);
}
```

Expand Down Expand Up @@ -302,12 +302,12 @@ project.
There’s just one line of this first example left:

```rust,ignore
println!("You guessed: {}", input);
println!("You guessed: {}", guess);
}
```

This prints out the string we saved our input in. The `{}`s are a placeholder,
and so we pass it `input` as an argument. If we had multiple `{}`s, we would
and so we pass it `guess` as an argument. If we had multiple `{}`s, we would
pass multiple arguments:

```rust
Expand Down