use tally::count; fn main() { let path = std::env::args().nth(1).expect("a file to count"); let text = std::fs::read_to_string(&path).unwrap(); let c = count(&text); println!("{:>8} {:>8} {:>8} {}", c.lines, c.words, c.bytes, path); }