File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -130,14 +130,14 @@ macro_rules! println {
130
130
///
131
131
/// fn write_to_file_using_try() -> Result<(), io::Error> {
132
132
/// let mut file = try!(File::create("my_best_friends.txt"));
133
- /// try!(file.write_line( "This is a list of my best friends."));
133
+ /// try!(file.write_all(b "This is a list of my best friends."));
134
134
/// println!("I wrote to the file");
135
135
/// Ok()
136
136
/// }
137
137
/// // This is equivalent to:
138
138
/// fn write_to_file_using_match() -> Result<(), io::Error> {
139
139
/// let mut file = try!(File::create("my_best_friends.txt"));
140
- /// match file.write_line( "This is a list of my best friends.") {
140
+ /// match file.write_all(b "This is a list of my best friends.") {
141
141
/// Ok(_) => (),
142
142
/// Err(e) => return Err(e),
143
143
/// }
You can’t perform that action at this time.
0 commit comments