fs::write: Add example writing a &str
This commit is contained in:
parent
575ac946bc
commit
bf6804b79c
1 changed files with 1 additions and 0 deletions
|
|
@ -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(())
|
||||
/// }
|
||||
/// ```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue