fn cat(path: &Path) -> io::Result<String> {
    let mut f = File::open(path)?;
    let mut s = String::new();
    match f.read_to_string(&mut s) {
        Ok(_) => Ok(s),
        Err(e) => Err(e),
    }
}
// A simple implementation of `% cat path`
A simple implementation of `% cat path`
A simple implementation of ` % cat path `
fn cat(path: &Path) -> io::Result<String> {
    let mut f = File::open(path)?;
    let mut s = String::new();
    match f.read_to_string(&mut s) {
        Ok(_) => Ok(s),
        Err(e) => Err(e),
    }
}
fn cat ( path : & Path ) -> io :: Result < String > { let mut f = File :: open ( path ) ? ; let mut s = String :: new ( ) ; match f . read_to_string ( & mut s ) { Ok ( _ ) => Ok ( s ) , Err ( e ) => Err ( e ) , } }
A simple implementation of `% cat path`
A simple implementation of ` % cat path `
path
&Path