From 504916c18b13f6585a2856b6d9337b7311f9b522 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Fri, 30 Mar 2018 09:55:52 -0700 Subject: [PATCH] fs_read_write_bytes stabilized in 1.26.0 --- src/libstd/fs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 3f0acfeea2262..1b2ed2f6eb6cc 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -259,7 +259,7 @@ fn initial_buffer_size(file: &File) -> usize { /// Ok(()) /// } /// ``` -#[stable(feature = "fs_read_write_bytes", since = "1.27.0")] +#[stable(feature = "fs_read_write_bytes", since = "1.26.0")] pub fn read>(path: P) -> io::Result> { let mut file = File::open(path)?; let mut bytes = Vec::with_capacity(initial_buffer_size(&file)); @@ -330,7 +330,7 @@ pub fn read_string>(path: P) -> io::Result { /// Ok(()) /// } /// ``` -#[stable(feature = "fs_read_write_bytes", since = "1.27.0")] +#[stable(feature = "fs_read_write_bytes", since = "1.26.0")] pub fn write, C: AsRef<[u8]>>(path: P, contents: C) -> io::Result<()> { File::create(path)?.write_all(contents.as_ref()) }