fn http_proxy(config: &Config) -> CargoResult<Option<String>> {
    match try!(config.get_string("http.proxy")) {
        Some((s, _)) => return Ok(Some(s)),
        None => {}
    }
    match git2::Config::open_default() {
        Ok(cfg) => {
            match cfg.get_str("http.proxy") {
                Ok(s) => return Ok(Some(s.to_string())),
                Err(..) => {}
            }
        }
        Err(..) => {}
    }
    Ok(None)
}
/// Find an explicit HTTP proxy if one is available.
///
/// Favor cargo's `http.proxy`, then git's `http.proxy`. Proxies specified
/// via environment variables are picked up by libcurl.
Find an explicit HTTP proxy if one is available.
Find an explicit HTTP proxy if one is available .
fn http_proxy(config: &Config) -> CargoResult<Option<String>> {
    match try!(config.get_string("http.proxy")) {
        Some((s, _)) => return Ok(Some(s)),
        None => {}
    }
    match git2::Config::open_default() {
        Ok(cfg) => {
            match cfg.get_str("http.proxy") {
                Ok(s) => return Ok(Some(s.to_string())),
                Err(..) => {}
            }
        }
        Err(..) => {}
    }
    Ok(None)
}
fn http_proxy ( config : & Config ) -> CargoResult < Option < String > > { match try ! ( config get_string ( " " ) ) { Some ( ( s , _ ) ) => return Ok ( Some ( s ) ) , None => { } } match git2 :: Config :: open_default ( ) { Ok ( cfg ) => { match cfg . get_str ( " " ) { Ok ( s ) => return Ok ( Some ( s . to_string ( ) ) ) , Err ( .. ) => { } } } Err ( .. ) => { } } Ok ( None ) }
Find an explicit HTTP proxy if one is available.
Find an explicit HTTP proxy if one is available .
config
&Config
config
&Config