pub fn parse_crate_name_from_uri(&self) -> Result<Dependency> {
        if self.is_github_url() {
            if let Ok(ref crate_name) = get_crate_name_from_github(self.0) {
                return Ok(Dependency::new(crate_name).set_git(self.0));
            }
        } else if self.is_gitlab_url() {
            if let Ok(ref crate_name) = get_crate_name_from_gitlab(self.0) {
                return Ok(Dependency::new(crate_name).set_git(self.0));
            }
        } else if self.is_path() {
            if let Ok(ref crate_name) = get_crate_name_from_path(self.0) {
                return Ok(Dependency::new(crate_name).set_path(self.0));
            }
        }

        bail!("Unable to obtain crate informations from `{}`.\n", self.0)
    }
/// Will parse this crate name on the assumption that it is a URI.
Will parse this crate name on the assumption that it is a URI.
Will parse this crate name on the assumption that it is a URI .
pub fn parse_crate_name_from_uri(&self) -> Result<Dependency> {
        if self.is_github_url() {
            if let Ok(ref crate_name) = get_crate_name_from_github(self.0) {
                return Ok(Dependency::new(crate_name).set_git(self.0));
            }
        } else if self.is_gitlab_url() {
            if let Ok(ref crate_name) = get_crate_name_from_gitlab(self.0) {
                return Ok(Dependency::new(crate_name).set_git(self.0));
            }
        } else if self.is_path() {
            if let Ok(ref crate_name) = get_crate_name_from_path(self.0) {
                return Ok(Dependency::new(crate_name).set_path(self.0));
            }
        }
        bail!("Unable to obtain crate informations from `{}`.\n", self.0)
    }
pub fn parse_crate_name_from_uri ( & self ) -> Result < Dependency > { if self . is_github_url ( ) { if let Ok ( ref crate_name ) = get_crate_name_from_github ( self . 0 ) { return Ok ( Dependency :: new ( crate_name ) . set_git ( self . 0 ) ) ; } } else if self . is_gitlab_url ( ) { if let Ok ( ref crate_name ) = get_crate_name_from_gitlab ( self . 0 ) { return Ok ( Dependency :: new ( crate_name ) . set_git ( self . 0 ) ) ; } } else if self . is_path ( ) { if let Ok ( ref crate_name ) = get_crate_name_from_path ( self . 0 ) { return Ok ( Dependency :: new ( crate_name ) . set_path ( self . 0 ) ) ; } } bail ! ( " \n " self 0 ) }
Will parse this crate name on the assumption that it is a URI.
Will parse this crate name on the assumption that it is a URI .
&self