fs::write: Add example writing a &str

This commit is contained in:
Aaron DeVore 2018-05-10 11:47:31 -07:00
parent 9e3caa23f9
commit 2ae8accd24

View file

@ -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(())
/// }
/// ```