diff options
| author | bors <bors@rust-lang.org> | 2014-10-30 13:57:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-10-30 13:57:07 +0000 |
| commit | abb3b9c505f31f4f28cf238cf553efc22bf68790 (patch) | |
| tree | 78a646de122f9838fc117eb573d6b0fda120c01d /src/libstd | |
| parent | ad4557ce76ccf8d774bd28b6d7a4e43e73200f21 (diff) | |
| parent | 72fb8f36881784c24acc3febd429d642ddb64c2c (diff) | |
| download | rust-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.rs | 7 |
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>, |
