Skip to content

Commit

Permalink
Fix example for BufferedReader
Browse files Browse the repository at this point in the history
  • Loading branch information
steveklabnik committed Oct 28, 2014
1 parent e2cd459 commit 72fb8f3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/libstd/io/buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down

2 comments on commit 72fb8f3

@sfackler
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

@alexcrichton
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors: retry

Please sign in to comment.