// Working with files in Rust

use std::fs;

fn main() {
    let input = "Foo";
    let filename = "/tmp/foo.txt";
    fs::write(filename, input).expect("Unable to write file");
    let output = fs::read_to_string(filename).expect("Unable to read file");
    assert_eq!(input, output);
}