fn fetch(pid: &str) -> Result<String, io::Error> {
        let path = format!("/{}/{}/statm", PROC, pid);
        let mut s = String::new();
        match fs::File::open(path) {
            Ok(f) => {
                let mut buf = io::BufReader::new(f);
                buf.read_to_string(&mut s).unwrap();
                Ok(s)
            }
            Err(e) => Err(e),
        }
    }
/// Fetches the str from statm file
Fetches the str from statm file
Fetches the str from statm file
fn fetch(pid: &str) -> Result<String, io::Error> {
        let path = format!("/{}/{}/statm", PROC, pid);
        let mut s = String::new();
        match fs::File::open(path) {
            Ok(f) => {
                let mut buf = io::BufReader::new(f);
                buf.read_to_string(&mut s).unwrap();
                Ok(s)
            }
            Err(e) => Err(e),
        }
    }
fn fetch ( pid : & str ) -> Result < String , io :: Error > { let path = format ! ( " " PROC pid ) ; let mut s = String :: new ( ) ; match fs :: File :: open ( path ) { Ok ( f ) => { let mut buf = io :: BufReader :: new ( f ) ; buf . read_to_string ( & mut s ) . unwrap ( ) ; Ok ( s ) } Err ( e ) => Err ( e ) , } }
Fetches the str from statm file
Fetches the str from statm file
pid
&str
pid
&str