pub fn read_file(path: &std::path::Path) -> String {
        let f = File::open(&path).unwrap();
        let mut r = BufReader::new(f);
        let mut result = String::new();
        r.read_to_string(&mut result).unwrap();
        result
    }
/// Reads contents of a file to a string.
/// Panics on errors.
Reads contents of a file to a string.
Panics on errors.
Reads contents of a file to a string . Panics on errors .
pub fn read_file(path: &std::path::Path) -> String {
        let f = File::open(&path).unwrap();
        let mut r = BufReader::new(f);
        let mut result = String::new();
        r.read_to_string(&mut result).unwrap();
        result
    }
pub fn read_file ( path : & std :: path :: Path ) -> String { let f = File :: open ( & path ) . unwrap ( ) ; let mut r = BufReader :: new ( f ) ; let mut result = String :: new ( ) ; r . read_to_string ( & mut result ) . unwrap ( ) ; result }
Reads contents of a file to a string.
Reads contents of a file to a string .
path
&std::path::Path
path
&std::path::Path