From e78356784be389e5660780f838760d5a5fba30c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=89=E3=81=84=E3=81=A9=E3=81=A3=E3=81=A8?= Date: Wed, 6 May 2015 23:17:03 +0900 Subject: [PATCH] doc: Fix print value `input` -> `guess` --- src/doc/trpl/guessing-game.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/doc/trpl/guessing-game.md b/src/doc/trpl/guessing-game.md index 431b7dc50a299..a400abfa3d8e8 100644 --- a/src/doc/trpl/guessing-game.md +++ b/src/doc/trpl/guessing-game.md @@ -82,11 +82,11 @@ fn main() { let mut guess = String::new(); - let input = io::stdin().read_line(&mut guess) + io::stdin().read_line(&mut guess) .ok() .expect("Failed to read line"); - println!("You guessed: {}", input); + println!("You guessed: {}", guess); } ``` @@ -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