diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/download.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/download.rs b/src/download.rs index 80a159b..72cdaf3 100644 --- a/src/download.rs +++ b/src/download.rs @@ -1,7 +1,6 @@ use std::path::{Path, PathBuf}; use anyhow::{bail, Error, Context}; -use fehler::throws; use hyper::Uri; use hyper::body::HttpBody; use hyper::client::{Client, HttpConnector}; @@ -14,8 +13,7 @@ use super::Args; type HttpsClient = Client<HttpsConnector<HttpConnector>>; -#[throws] -pub(crate) async fn download(url: Uri, args: &Args) { +pub(crate) async fn download(url: Uri, args: &Args) -> Result<(), Error> { let output_file_path = if let Some(output) = &args.output_document { Some(output.clone()) } else { @@ -56,4 +54,6 @@ pub(crate) async fn download(url: Uri, args: &Args) { while let Some(data) = response.body_mut().data().await { output_file.write_all(&data?).await?; } + + Ok(()) } |