diff --git a/src/interactors/bitbucket.rs b/src/interactors/bitbucket.rs index b21e8b4..c058553 100644 --- a/src/interactors/bitbucket.rs +++ b/src/interactors/bitbucket.rs @@ -1,3 +1,4 @@ +use failure::Error; use hyper::Uri; use relative_path::RelativePathBuf; @@ -5,13 +6,13 @@ use ::models::repo::RepoPath; const BITBUCKET_USER_CONTENT_BASE_URI: &'static str = "https://bitbucket.org"; -pub fn get_manifest_uri(repo_path: &RepoPath, path: &RelativePathBuf) -> Result { +pub fn get_manifest_uri(repo_path: &RepoPath, path: &RelativePathBuf) -> Result { let path_str: &str = path.as_ref(); - format!("{}/{}/{}/raw/master/{}", + Ok(format!("{}/{}/{}/raw/master/{}", BITBUCKET_USER_CONTENT_BASE_URI, repo_path.qual.as_ref(), repo_path.name.as_ref(), path_str - ).parse::() + ).parse::()?) }