fn hash(&mut self, pkg: &PackageId) -> CargoResult<String> {
        let key = (pkg.name().to_string(), pkg.version().to_string());
        if let Some(s) = self.hashes.get(&key) {
            return Ok(s.clone())
        }
        // Ok, we're missing the key, so parse the index file to load it.
        try!(self.summaries(pkg.name()));
        self.hashes.get(&key).chain_error(|| {
            internal(format!("no hash listed for {}", pkg))
        }).map(|s| s.clone())
    }
/// Return the hash listed for a specified PackageId.
Return the hash listed for a specified PackageId.
Return the hash listed for a specified PackageId .
fn hash(&mut self, pkg: &PackageId) -> CargoResult<String> {
        let key = (pkg.name().to_string(), pkg.version().to_string());
        if let Some(s) = self.hashes.get(&key) {
            return Ok(s.clone())
        }
        // Ok, we're missing the key, so parse the index file to load it.
        try!(self.summaries(pkg.name()));
        self.hashes.get(&key).chain_error(|| {
            internal(format!("no hash listed for {}", pkg))
        }).map(|s| s.clone())
    }
fn hash ( & mut self , pkg : & PackageId ) -> CargoResult < String > { let key = ( pkg . name ( ) . to_string ( ) , pkg . version ( ) . to_string ( ) ) ; if let Some ( s ) = self . hashes . get ( & key ) { return Ok ( s . clone ( ) ) } // Ok, we're missing the key, so parse the index file to load it. try ! ( self summaries ( pkg name ( ) ) ) ; self . hashes . get ( & key ) . chain_error ( | | { internal ( format ! ( " " pkg ) ) } ) . map ( | s | s . clone ( ) ) }
Return the hash listed for a specified PackageId.
Return the hash listed for a specified PackageId .
&mut self
pkg
&PackageId
&mut self
pkg
&PackageId