fast-fantoir/src/main.rs

20 lines
514 B
Rust

use std::fs::File;
use std::io::{BufReader, BufRead};
fn main() -> std::io::Result<()> {
let fantoir_path = std::env::args().nth(1).unwrap();
let file = match File::open(&fantoir_path) {
Err(err) => panic!("Cannot read file {}: {}", fantoir_path, err),
Ok(file) => file,
};
let reader = BufReader::new(file);
for line in reader.lines() {
match line {
Ok(_l) => (),
Err(err) => panic!("Cannot read line: {}", err),
}
};
Ok(())
}