mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2024-11-09 08:51:18 +08:00
Merge pull request #17 from usernameisnull/patch-2
Update ch02-00-guessing-game-tutorial.md
This commit is contained in:
commit
f7b4443139
@ -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");
|
||||||
|
Loading…
Reference in New Issue
Block a user