fn parse(&self) -> HashMap<&str, &str> {
        let mut hash = HashMap::new();

        for line in self.content().lines() {
            let split: Vec<&str> = line.split_whitespace().collect();

            if split.len() != 2 {
                panic!("malformed shasums file");
            }

            let shasum   = split[0];
            let filename = split[1];

            hash.insert(filename, shasum);
        }

        hash
    }
// Parses the shasums text into an easy to use hash.
// Expects to find a whitespace separated file with two columns of
// "shasum filename".
// Panics if the shasums content can't be parsed.
Parses the shasums text into an easy to use hash.
Expects to find a whitespace separated file with two columns of
"shasum filename".
Panics if the shasums content can't be parsed.
Parses the shasums text into an easy to use hash . Expects to find a whitespace separated file with two columns of " shasum filename " . Panics if the shasums content can ' t be parsed .
fn parse(&self) -> HashMap<&str, &str> {
        let mut hash = HashMap::new();
        for line in self.content().lines() {
            let split: Vec<&str> = line.split_whitespace().collect();
            if split.len() != 2 {
                panic!("malformed shasums file");
            }
            let shasum   = split[0];
            let filename = split[1];
            hash.insert(filename, shasum);
        }
        hash
    }
fn parse ( & self ) -> HashMap < & str , & str > { let mut hash = HashMap :: new ( ) ; for line in self . content ( ) . lines ( ) { let split : Vec < & str > = line . split_whitespace ( ) . collect ( ) ; if split . len ( ) != 2 { panic ! ( " " ) ; } let shasum = split [ 0 ] ; let filename = split [ 1 ] ; hash . insert ( filename , shasum ) ; } hash }
Parses the shasums text into an easy to use hash.
Parses the shasums text into an easy to use hash .
&self
&self