diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-06-03 18:05:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-03 18:05:41 +0200 |
| commit | ec2826cc2e0b3a800836bcf8733dee0924f6b7ab (patch) | |
| tree | 47316d43cb359f49cff65fe8a92744c5b0f21d8a | |
| parent | 7973d9381fe813abc83b3849fdf1fd9de8b51e5d (diff) | |
| parent | 7d27c631144cdf847d5c1f4ca27e6c7414a068ab (diff) | |
| download | rust-ec2826cc2e0b3a800836bcf8733dee0924f6b7ab.tar.gz rust-ec2826cc2e0b3a800836bcf8733dee0924f6b7ab.zip | |
Rollup merge of #72924 - JohnTitor:stabilize-buf-capacity, r=shepmaster
Stabilize `std::io::Buf{Reader, Writer}::capacity`
Closes #68833
FCP is done here: https://github.com/rust-lang/rust/issues/68833#issuecomment-637596083
| -rw-r--r-- | src/libstd/io/buffered.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index 046b1a68880..e986a39eb03 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -184,7 +184,6 @@ impl<R> BufReader<R> { /// # Examples /// /// ```no_run - /// #![feature(buffered_io_capacity)] /// use std::io::{BufReader, BufRead}; /// use std::fs::File; /// @@ -198,7 +197,7 @@ impl<R> BufReader<R> { /// Ok(()) /// } /// ``` - #[unstable(feature = "buffered_io_capacity", issue = "68833")] + #[stable(feature = "buffered_io_capacity", since = "1.46.0")] pub fn capacity(&self) -> usize { self.buf.len() } @@ -609,7 +608,6 @@ impl<W: Write> BufWriter<W> { /// # Examples /// /// ```no_run - /// #![feature(buffered_io_capacity)] /// use std::io::BufWriter; /// use std::net::TcpStream; /// @@ -620,7 +618,7 @@ impl<W: Write> BufWriter<W> { /// // Calculate how many bytes can be written without flushing /// let without_flush = capacity - buf_writer.buffer().len(); /// ``` - #[unstable(feature = "buffered_io_capacity", issue = "68833")] + #[stable(feature = "buffered_io_capacity", since = "1.46.0")] pub fn capacity(&self) -> usize { self.buf.capacity() } |
