Merge pull request #145 from tonyljl526/feature_fix_ch02-00_wrong_character

feature_fix_ch02-00_wrong_character
This commit is contained in:
KaiserY 2018-01-10 17:37:08 +08:00 committed by GitHub
commit a3b9254db2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -150,7 +150,7 @@ io::stdin().read_line(&mut guess)
.expect("Failed to read line"); .expect("Failed to read line");
``` ```
如果程序的开头没有 `use std::io` 这一行,可以把函数调用写成 `std::io::stdin`。`stdin` 函数返回一个 [`std::io::Stdin`][iostdin]<!-- ignore --> 的实例,这代表终端标准输入句柄的类型。 如果程序的开头没有 `use std::io` 这一行,可以把函数调用写成 `std::io::stdin`。`stdin` 函数返回一个 [`std::io::stdin`][iostdin]<!-- ignore --> 的实例,这代表终端标准输入句柄的类型。
[iostdin]: https://doc.rust-lang.org/std/io/struct.Stdin.html [iostdin]: https://doc.rust-lang.org/std/io/struct.Stdin.html