fn read_file_fully(path: &Path) -> Vec<u8> {
    let mut f = File::open(path).unwrap_or_else(|_| panic!("Value file not found at: {:?}", path));
    let metadata = metadata(path).expect("Unable to read metadata");
    let mut buffer = vec![0; metadata.len() as usize];
    f.read_exact(&mut buffer)
        .unwrap_or_else(|_| panic!("Couldn't read the content of {:?}", path));
    buffer
}
/// Read a file fully into a vector.
Read a file fully into a vector.
Read a file fully into a vector .
fn read_file_fully(path: &Path) -> Vec<u8> {
    let mut f = File::open(path).unwrap_or_else(|_| panic!("Value file not found at: {:?}", path));
    let metadata = metadata(path).expect("Unable to read metadata");
    let mut buffer = vec![0; metadata.len() as usize];
    f.read_exact(&mut buffer)
        .unwrap_or_else(|_| panic!("Couldn't read the content of {:?}", path));
    buffer
}
fn read_file_fully ( path : & Path ) -> Vec < u8 > { let mut f = File :: open ( path ) . unwrap_or_else ( | _ | panic ! ( " " path ) ) ; let metadata = metadata ( path ) . expect ( " " ) ; let mut buffer = vec ! [ 0 metadata len ( ) as usize ] ; f . read_exact ( & mut buffer ) . unwrap_or_else ( | _ | panic ! ( " " path ) ) ; buffer }
Read a file fully into a vector.
Read a file fully into a vector .
path
&Path
path
&Path