From 0600d0f38d4998f1cacb3b97408224a0ee350db4 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Tue, 27 Mar 2018 10:20:27 -0700 Subject: [PATCH] Stabilize fs::read and fs::write --- src/libstd/fs.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 5caa703ee97e3..b5476e9326dbb 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -251,8 +251,6 @@ fn initial_buffer_size(file: &File) -> usize { /// # Examples /// /// ```no_run -/// #![feature(fs_read_write)] -/// /// use std::fs; /// use std::net::SocketAddr; /// @@ -261,7 +259,7 @@ fn initial_buffer_size(file: &File) -> usize { /// # Ok(()) /// # } /// ``` -#[unstable(feature = "fs_read_write", issue = "46588")] +#[stable(feature = "fs_read_write_bytes", since = "1.27.0")] pub fn read>(path: P) -> io::Result> { let mut file = File::open(path)?; let mut bytes = Vec::with_capacity(initial_buffer_size(&file)); @@ -325,8 +323,6 @@ pub fn read_string>(path: P) -> io::Result { /// # Examples /// /// ```no_run -/// #![feature(fs_read_write)] -/// /// use std::fs; /// /// # fn foo() -> std::io::Result<()> { @@ -334,7 +330,7 @@ pub fn read_string>(path: P) -> io::Result { /// # Ok(()) /// # } /// ``` -#[unstable(feature = "fs_read_write", issue = "46588")] +#[stable(feature = "fs_read_write_bytes", since = "1.27.0")] pub fn write, C: AsRef<[u8]>>(path: P, contents: C) -> io::Result<()> { File::create(path)?.write_all(contents.as_ref()) }