Skip to content

Commit

Permalink
Stabilize std::io::read_to_string
Browse files Browse the repository at this point in the history
  • Loading branch information
camelid committed Aug 9, 2022
1 parent 6d3f1be commit c04568b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions library/std/src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1028,8 +1028,6 @@ pub trait Read {
/// # Examples
///
/// ```no_run
/// #![feature(io_read_to_string)]
///
/// # use std::io;
/// fn main() -> io::Result<()> {
/// let stdin = io::read_to_string(io::stdin())?;
Expand All @@ -1038,7 +1036,7 @@ pub trait Read {
/// Ok(())
/// }
/// ```
#[unstable(feature = "io_read_to_string", issue = "80218")]
#[stable(feature = "io_read_to_string", since = "1.65.0")]
pub fn read_to_string<R: Read>(mut reader: R) -> Result<String> {
let mut buf = String::new();
reader.read_to_string(&mut buf)?;
Expand Down

0 comments on commit c04568b

Please sign in to comment.