cargo fmt

This commit is contained in:
Jordan Petridis
2018-05-20 16:39:36 +03:00
parent 0b6bbf6733
commit 784e117a8a
8 changed files with 38 additions and 19 deletions
+4 -2
View File
@@ -197,7 +197,8 @@ pub fn get_episode(
}
pub fn cache_image(pd: &PodcastCoverQuery) -> Result<String, DownloadError> {
let url = pd.image_uri()
let url = pd
.image_uri()
.ok_or_else(|| DownloadError::NoImageLocation)?
.to_owned();
@@ -215,7 +216,8 @@ pub fn cache_image(pd: &PodcastCoverQuery) -> Result<String, DownloadError> {
// For some reason there is no .first() method so nth(0) is used
let path = foo.nth(0).and_then(|x| x.ok());
if let Some(p) = path {
return Ok(p.to_str()
return Ok(p
.to_str()
.ok_or_else(|| DownloadError::InvalidCachedImageLocation)?
.into());
}