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 authored and Mark-Simulacrum committed May 12, 2018
1 parent 575ac94 commit bf6804b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libstd/fs.rs
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 bf6804b

Please sign in to comment.