use std::fs::File; use std::io::{self, BufRead}; use std::path::Path; pub fn read_lines

(filename: P) -> io::Result>> where P: AsRef, { let file = File::open(filename)?; Ok(io::BufReader::new(file).lines()) }