summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-10-30 13:57:07 +0000
committerbors <bors@rust-lang.org>2014-10-30 13:57:07 +0000
commitabb3b9c505f31f4f28cf238cf553efc22bf68790 (patch)
tree78a646de122f9838fc117eb573d6b0fda120c01d /src/libstd
parentad4557ce76ccf8d774bd28b6d7a4e43e73200f21 (diff)
parent72fb8f36881784c24acc3febd429d642ddb64c2c (diff)
downloadrust-abb3b9c505f31f4f28cf238cf553efc22bf68790.tar.gz
rust-abb3b9c505f31f4f28cf238cf553efc22bf68790.zip
auto merge of #18374 : steveklabnik/rust/gh18197, r=sfackler
Fixes #18197
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io/buffered.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs
index 9cd8dbcc509..a01787c286b 100644
--- a/src/libstd/io/buffered.rs
+++ b/src/libstd/io/buffered.rs
@@ -130,14 +130,13 @@ impl<R: Reader> Reader for BufferedReader<R> {
 /// # Example
 ///
 /// ```rust
-/// # #![allow(unused_must_use)]
 /// use std::io::{BufferedWriter, File};
 ///
-/// let file = File::open(&Path::new("message.txt"));
+/// let file = File::create(&Path::new("message.txt")).unwrap();
 /// let mut writer = BufferedWriter::new(file);
 ///
-/// writer.write_str("hello, world");
-/// writer.flush();
+/// writer.write_str("hello, world").unwrap();
+/// writer.flush().unwrap();
 /// ```
 pub struct BufferedWriter<W> {
     inner: Option<W>,