fn print_to_stdout(file: &Path) -> io::Result<()> {
    let mut openfile = try!{
        OpenOptions::new()
            .read(true)
            .open(file)
    };

    let mut file_buffer: Vec<u8> = Vec::new();
    try!(openfile.read_to_end(&mut file_buffer));
    try!(stdout().write_all(&file_buffer));

    Ok(())
}
// Reads the given file and prints its contents to standard output
Reads the given file and prints its contents to standard output
Reads the given file and prints its contents to standard output
fn print_to_stdout(file: &Path) -> io::Result<()> {
    let mut openfile = try!{
        OpenOptions::new()
            .read(true)
            .open(file)
    };
    let mut file_buffer: Vec<u8> = Vec::new();
    try!(openfile.read_to_end(&mut file_buffer));
    try!(stdout().write_all(&file_buffer));
    Ok(())
}
fn print_to_stdout ( file : & Path ) -> io :: Result < ( ) > { let mut openfile = try ! { OpenOptions new ( ) read ( true ) open ( file ) } ; let mut file_buffer : Vec < u8 > = Vec :: new ( ) ; try ! ( openfile read_to_end ( mut file_buffer ) ) ; try ! ( stdout ( ) write_all ( file_buffer ) ) ; Ok ( ( ) ) }
Reads the given file and prints its contents to standard output
Reads the given file and prints its contents to standard output
file
&Path
file
&Path