Skip to content

Commit

Permalink
Stabilize bufreader_buffer feature
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed May 27, 2019
1 parent 4dbc7f9 commit 06eb412
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/libstd/io/buffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ impl<R> BufReader<R> {
/// # Examples
///
/// ```no_run
/// # #![feature(bufreader_buffer)]
/// use std::io::{BufReader, BufRead};
/// use std::fs::File;
///
Expand All @@ -173,7 +172,7 @@ impl<R> BufReader<R> {
/// Ok(())
/// }
/// ```
#[unstable(feature = "bufreader_buffer", issue = "45323")]
#[stable(feature = "bufreader_buffer", since = "1.37.0")]
pub fn buffer(&self) -> &[u8] {
&self.buf[self.pos..self.cap]
}
Expand Down Expand Up @@ -552,7 +551,6 @@ impl<W: Write> BufWriter<W> {
/// # Examples
///
/// ```no_run
/// # #![feature(bufreader_buffer)]
/// use std::io::BufWriter;
/// use std::net::TcpStream;
///
Expand All @@ -561,7 +559,7 @@ impl<W: Write> BufWriter<W> {
/// // See how many bytes are currently buffered
/// let bytes_buffered = buf_writer.buffer().len();
/// ```
#[unstable(feature = "bufreader_buffer", issue = "45323")]
#[stable(feature = "bufreader_buffer", since = "1.37.0")]
pub fn buffer(&self) -> &[u8] {
&self.buf
}
Expand Down

0 comments on commit 06eb412

Please sign in to comment.