Anonymous user
File input/output: Difference between revisions
→Rust: Use `std::fs::{read, write}` to make the solution simpler
m (Removed spaces around Uxntal code.) |
imported>Collin (→Rust: Use `std::fs::{read, write}` to make the solution simpler) |
||
Line 3,531:
=={{header|Rust}}==
<syntaxhighlight lang="rust">
let contents = std::fs::read("input.txt").expect("error reading input.txt");
std::fs::write("output.txt", contents).expect("error writing output.txt");
}
</syntaxhighlight>
|