From 7d27c631144cdf847d5c1f4ca27e6c7414a068ab Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Wed, 3 Jun 2020 04:23:01 +0900 Subject: [PATCH] Stabilize `std::io::Buf{Reader, Writer}::capacity` --- src/libstd/io/buffered.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index 046b1a6888024..e986a39eb03e0 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -184,7 +184,6 @@ impl BufReader { /// # Examples /// /// ```no_run - /// #![feature(buffered_io_capacity)] /// use std::io::{BufReader, BufRead}; /// use std::fs::File; /// @@ -198,7 +197,7 @@ impl BufReader { /// 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 BufWriter { /// # Examples /// /// ```no_run - /// #![feature(buffered_io_capacity)] /// use std::io::BufWriter; /// use std::net::TcpStream; /// @@ -620,7 +618,7 @@ impl BufWriter { /// // 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() }