fs::{read, read_string, write}: add tracking issue number
This commit is contained in:
parent
1cf11b3d0b
commit
c5eff5442c
1 changed files with 3 additions and 3 deletions
|
@ -244,7 +244,7 @@ pub struct DirBuilder {
|
||||||
/// # Ok(())
|
/// # Ok(())
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "fs_read_write", issue = /* FIXME */ "0")]
|
#[unstable(feature = "fs_read_write", issue = "46588")]
|
||||||
pub fn read<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
|
pub fn read<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
|
||||||
let mut bytes = Vec::new();
|
let mut bytes = Vec::new();
|
||||||
File::open(path)?.read_to_end(&mut bytes)?;
|
File::open(path)?.read_to_end(&mut bytes)?;
|
||||||
|
@ -285,7 +285,7 @@ pub fn read<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
|
||||||
/// # Ok(())
|
/// # Ok(())
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "fs_read_write", issue = /* FIXME */ "0")]
|
#[unstable(feature = "fs_read_write", issue = "46588")]
|
||||||
pub fn read_string<P: AsRef<Path>>(path: P) -> io::Result<String> {
|
pub fn read_string<P: AsRef<Path>>(path: P) -> io::Result<String> {
|
||||||
let mut string = String::new();
|
let mut string = String::new();
|
||||||
File::open(path)?.read_to_string(&mut string)?;
|
File::open(path)?.read_to_string(&mut string)?;
|
||||||
|
@ -315,7 +315,7 @@ pub fn read_string<P: AsRef<Path>>(path: P) -> io::Result<String> {
|
||||||
/// # Ok(())
|
/// # Ok(())
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "fs_read_write", issue = /* FIXME */ "0")]
|
#[unstable(feature = "fs_read_write", issue = "46588")]
|
||||||
pub fn write<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> io::Result<()> {
|
pub fn write<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> io::Result<()> {
|
||||||
File::create(path)?.write_all(contents.as_ref())
|
File::create(path)?.write_all(contents.as_ref())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue