File tree 1 file changed +2
-6
lines changed
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -251,8 +251,6 @@ fn initial_buffer_size(file: &File) -> usize {
251
251
/// # Examples
252
252
///
253
253
/// ```no_run
254
- /// #![feature(fs_read_write)]
255
- ///
256
254
/// use std::fs;
257
255
/// use std::net::SocketAddr;
258
256
///
@@ -261,7 +259,7 @@ fn initial_buffer_size(file: &File) -> usize {
261
259
/// Ok(())
262
260
/// }
263
261
/// ```
264
- #[ unstable ( feature = "fs_read_write " , issue = "46588 " ) ]
262
+ #[ stable ( feature = "fs_read_write_bytes " , since = "1.27.0 " ) ]
265
263
pub fn read < P : AsRef < Path > > ( path : P ) -> io:: Result < Vec < u8 > > {
266
264
let mut file = File :: open ( path) ?;
267
265
let mut bytes = Vec :: with_capacity ( initial_buffer_size ( & file) ) ;
@@ -325,16 +323,14 @@ pub fn read_string<P: AsRef<Path>>(path: P) -> io::Result<String> {
325
323
/// # Examples
326
324
///
327
325
/// ```no_run
328
- /// #![feature(fs_read_write)]
329
- ///
330
326
/// use std::fs;
331
327
///
332
328
/// fn main() -> std::io::Result<()> {
333
329
/// fs::write("foo.txt", b"Lorem ipsum")?;
334
330
/// Ok(())
335
331
/// }
336
332
/// ```
337
- #[ unstable ( feature = "fs_read_write " , issue = "46588 " ) ]
333
+ #[ stable ( feature = "fs_read_write_bytes " , since = "1.27.0 " ) ]
338
334
pub fn write < P : AsRef < Path > , C : AsRef < [ u8 ] > > ( path : P , contents : C ) -> io:: Result < ( ) > {
339
335
File :: create ( path) ?. write_all ( contents. as_ref ( ) )
340
336
}
You can’t perform that action at this time.
0 commit comments