Merge pull request #17 from usernameisnull/patch-2

Update ch02-00-guessing-game-tutorial.md
This commit is contained in:
KaiserY 2017-04-15 23:17:17 -05:00 committed by GitHub
commit f7b4443139

View File

@ -169,7 +169,7 @@ io::stdin().read_line(&mut guess)
.expect("Failed to read line"); .expect("Failed to read line");
``` ```
当使用`.foo()`语法调用方法时,明智的选择是换行并留出空白(缩进)来把长的代码行拆开。我们可以把代码写成这样: 当使用`.expect()`语法调用方法时,明智的选择是换行并留出空白(缩进)来把长的代码行拆开。我们可以把代码写成这样:
```rust,ignore ```rust,ignore
io::stdin().read_line(&mut guess).expect("Failed to read line"); io::stdin().read_line(&mut guess).expect("Failed to read line");