Skip to content

Commit 517f240

Browse files
committed
Auto merge of #49521 - mbrubeck:fs_read_write_bytes, r=TimNN
fs_read_write_bytes stabilized in 1.26.0 Fix the stabilization attributes from #49422 because it merged before 1.26 branched to beta. r? @TimNN
2 parents e38eca6 + 504916c commit 517f240

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/fs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ fn initial_buffer_size(file: &File) -> usize {
259259
/// Ok(())
260260
/// }
261261
/// ```
262-
#[stable(feature = "fs_read_write_bytes", since = "1.27.0")]
262+
#[stable(feature = "fs_read_write_bytes", since = "1.26.0")]
263263
pub fn read<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
264264
let mut file = File::open(path)?;
265265
let mut bytes = Vec::with_capacity(initial_buffer_size(&file));
@@ -330,7 +330,7 @@ pub fn read_string<P: AsRef<Path>>(path: P) -> io::Result<String> {
330330
/// Ok(())
331331
/// }
332332
/// ```
333-
#[stable(feature = "fs_read_write_bytes", since = "1.27.0")]
333+
#[stable(feature = "fs_read_write_bytes", since = "1.26.0")]
334334
pub fn write<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> io::Result<()> {
335335
File::create(path)?.write_all(contents.as_ref())
336336
}

0 commit comments

Comments
 (0)