Skip to content

Commit

Permalink
fs::write: Add example writing a &str
Browse files Browse the repository at this point in the history
  • Loading branch information
adevore committed May 10, 2018
1 parent 9e3caa2 commit 2ae8acc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libstd/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ pub fn read_to_string<P: AsRef<Path>>(path: P) -> io::Result<String> {
///
/// fn main() -> std::io::Result<()> {
/// fs::write("foo.txt", b"Lorem ipsum")?;
/// fs::write("bar.txt", "dolor sit")?;
/// Ok(())
/// }
/// ```
Expand Down

0 comments on commit 2ae8acc

Please sign in to comment.