From 161e29e6d6e640cdfb113302da45416e9b80a629 Mon Sep 17 00:00:00 2001 From: Paul Woolcock Date: Mon, 12 Feb 2018 22:32:54 -0500 Subject: [PATCH] use failure::Error instead of hyper::error::UriError --- src/interactors/bitbucket.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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::()?) }