diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 3f0acfeea22622bf597d3732088b04493da4bf79..1b2ed2f6eb6cccf3eea044c2f383674e5e18fc9d 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()) }