1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
pub mod cmd; pub mod feedback; pub mod search; pub mod termite; use std::fs::File; use std::io::{self, BufRead, BufReader}; use std::path::Path; pub fn read_lines<P>(filename: P) -> io::Result<io::Lines<io::BufReader<File>>> where P: AsRef<Path>, { let file = File::open(filename)?; Ok(BufReader::new(file).lines()) }