pub fn lines_from_file<T: AsRef<Path>>(filename: T) -> impl Iterator<Item = String> {
    let file = File::open(filename);
    let file = match file {
        Ok(n) => n,
        Err(_) => {
            println!("Error! File not found!");
            exit(0);
        }
    };
    let buf = BufReader::new(file);
    buf.lines().map(|l| l.expect("Could not parse line"))
}
// This function reads the lines from a file into a vector
This function reads the lines from a file into a vector
This function reads the lines from a file into a vector
pub fn lines_from_file<T: AsRef<Path>>(filename: T) -> impl Iterator<Item = String> {
    let file = File::open(filename);
    let file = match file {
        Ok(n) => n,
        Err(_) => {
            println!("Error! File not found!");
            exit(0);
        }
    };
    let buf = BufReader::new(file);
    buf.lines().map(|l| l.expect("Could not parse line"))
}
pub fn lines_from_file < T : AsRef < Path > > ( filename : T ) -> impl Iterator < Item = String > { let file = File :: open ( filename ) ; let file = match file { Ok ( n ) => n , Err ( _ ) => { println ! ( " " ) ; exit ( 0 ) ; } } ; let buf = BufReader :: new ( file ) ; buf . lines ( ) . map ( | l | l . expect ( " " ) ) }
This function reads the lines from a file into a vector
This function reads the lines from a file into a vector
filename
T
filename
T