Skip to content

Instantly share code, notes, and snippets.

View bjorns's full-sized avatar

Björn Skoglund bjorns

View GitHub Profile
use std::io::{File};
use std::str::from_utf8_owned;
fn main() {
let path = Path::new("foobar.log");
let mut hw_file = File::open(&path).ok().unwrap();
let data = from_utf8_owned(hw_file.read_to_end().ok().unwrap()).unwrap();
println!("{:s}", data);
}