write file add new line
This commit is contained in:
@@ -3,7 +3,7 @@ use std::io::prelude::*;
|
|||||||
|
|
||||||
fn main() -> std::io::Result<()> {
|
fn main() -> std::io::Result<()> {
|
||||||
let mut file = File::create("foo.txt")?;
|
let mut file = File::create("foo.txt")?;
|
||||||
file.write_all(b"Hello, world!")?;
|
file.write_all(b"Hello, world!\n")?;
|
||||||
println!("Hello, world!");
|
println!("Hello, world!");
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user