提交 5b59c141 编写于 作者: D dangcheng 提交者: GitHub

change error message

上级 b693a2e0
......@@ -275,7 +275,7 @@ won’t have its methods:
[write]: ../std/io/trait.Write.html
```rust,ignore
let mut f = std::fs::File::create("foo.txt").expect("Couldn’t open foo.txt");
let mut f = std::fs::File::create("foo.txt").expect("Couldn’t create foo.txt");
let buf = b"whatever"; // byte string literal. buf: &[u8; 8]
let result = f.write(buf);
# result.unwrap(); // ignore the error
......@@ -294,7 +294,7 @@ We need to `use` the `Write` trait first:
```rust,ignore
use std::io::Write;
let mut f = std::fs::File::create("foo.txt").expect("Couldn’t open foo.txt");
let mut f = std::fs::File::create("foo.txt").expect("Couldn’t create foo.txt");
let buf = b"whatever";
let result = f.write(buf);
# result.unwrap(); // ignore the error
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册