Skip to content

Commit ec2826c

Browse files
authored
Rollup merge of #72924 - JohnTitor:stabilize-buf-capacity, r=shepmaster
Stabilize `std::io::Buf{Reader, Writer}::capacity` Closes #68833 FCP is done here: #68833 (comment)
2 parents 7973d93 + 7d27c63 commit ec2826c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/libstd/io/buffered.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ impl<R> BufReader<R> {
184184
/// # Examples
185185
///
186186
/// ```no_run
187-
/// #![feature(buffered_io_capacity)]
188187
/// use std::io::{BufReader, BufRead};
189188
/// use std::fs::File;
190189
///
@@ -198,7 +197,7 @@ impl<R> BufReader<R> {
198197
/// Ok(())
199198
/// }
200199
/// ```
201-
#[unstable(feature = "buffered_io_capacity", issue = "68833")]
200+
#[stable(feature = "buffered_io_capacity", since = "1.46.0")]
202201
pub fn capacity(&self) -> usize {
203202
self.buf.len()
204203
}
@@ -609,7 +608,6 @@ impl<W: Write> BufWriter<W> {
609608
/// # Examples
610609
///
611610
/// ```no_run
612-
/// #![feature(buffered_io_capacity)]
613611
/// use std::io::BufWriter;
614612
/// use std::net::TcpStream;
615613
///
@@ -620,7 +618,7 @@ impl<W: Write> BufWriter<W> {
620618
/// // Calculate how many bytes can be written without flushing
621619
/// let without_flush = capacity - buf_writer.buffer().len();
622620
/// ```
623-
#[unstable(feature = "buffered_io_capacity", issue = "68833")]
621+
#[stable(feature = "buffered_io_capacity", since = "1.46.0")]
624622
pub fn capacity(&self) -> usize {
625623
self.buf.capacity()
626624
}

0 commit comments

Comments
 (0)