Skip to content

Commit a41fd59

Browse files
committed
Use write_all instead of write_line
1 parent d328d64 commit a41fd59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ macro_rules! println {
130130
///
131131
/// fn write_to_file_using_try() -> Result<(), io::Error> {
132132
/// 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."));
134134
/// println!("I wrote to the file");
135135
/// Ok()
136136
/// }
137137
/// // This is equivalent to:
138138
/// fn write_to_file_using_match() -> Result<(), io::Error> {
139139
/// 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.") {
141141
/// Ok(_) => (),
142142
/// Err(e) => return Err(e),
143143
/// }

0 commit comments

Comments
 (0)