fs::write: Add example writing a &str
This commit is contained in:
committed by
Mark Simulacrum
parent
575ac946bc
commit
bf6804b79c
@@ -331,6 +331,7 @@ pub fn read_to_string<P: AsRef<Path>>(path: P) -> io::Result<String> {
|
|||||||
///
|
///
|
||||||
/// fn main() -> std::io::Result<()> {
|
/// fn main() -> std::io::Result<()> {
|
||||||
/// fs::write("foo.txt", b"Lorem ipsum")?;
|
/// fs::write("foo.txt", b"Lorem ipsum")?;
|
||||||
|
/// fs::write("bar.txt", "dolor sit")?;
|
||||||
/// Ok(())
|
/// Ok(())
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|||||||
Reference in New Issue
Block a user