File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ won’t have its methods:
275
275
[ write ] : ../std/io/trait.Write.html
276
276
277
277
``` rust,ignore
278
- let mut f = std::fs::File::create("foo.txt").expect("Couldn’t open foo.txt");
278
+ let mut f = std::fs::File::create("foo.txt").expect("Couldn’t create foo.txt");
279
279
let buf = b"whatever"; // byte string literal. buf: &[u8; 8]
280
280
let result = f.write(buf);
281
281
# result.unwrap(); // ignore the error
@@ -294,7 +294,7 @@ We need to `use` the `Write` trait first:
294
294
``` rust,ignore
295
295
use std::io::Write;
296
296
297
- let mut f = std::fs::File::create("foo.txt").expect("Couldn’t open foo.txt");
297
+ let mut f = std::fs::File::create("foo.txt").expect("Couldn’t create foo.txt");
298
298
let buf = b"whatever";
299
299
let result = f.write(buf);
300
300
# result.unwrap(); // ignore the error
You can’t perform that action at this time.
0 commit comments