Stabilize std::io::read_to_string
This commit is contained in:
parent
223d16ebbd
commit
2df5afe622
@ -1037,8 +1037,6 @@ pub trait Read {
|
|||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// #![feature(io_read_to_string)]
|
|
||||||
///
|
|
||||||
/// # use std::io;
|
/// # use std::io;
|
||||||
/// fn main() -> io::Result<()> {
|
/// fn main() -> io::Result<()> {
|
||||||
/// let stdin = io::read_to_string(io::stdin())?;
|
/// let stdin = io::read_to_string(io::stdin())?;
|
||||||
@ -1047,7 +1045,7 @@ pub trait Read {
|
|||||||
/// Ok(())
|
/// Ok(())
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "io_read_to_string", issue = "80218")]
|
#[stable(feature = "io_read_to_string", since = "CURRENT_RUSTC_VERSION")]
|
||||||
pub fn read_to_string<R: Read>(mut reader: R) -> Result<String> {
|
pub fn read_to_string<R: Read>(mut reader: R) -> Result<String> {
|
||||||
let mut buf = String::new();
|
let mut buf = String::new();
|
||||||
reader.read_to_string(&mut buf)?;
|
reader.read_to_string(&mut buf)?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user