From 6db93c26dd904dd83744b2c1a2ec81a95237151a Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sat, 27 Mar 2021 09:45:26 -0600 Subject: sorry fehler but you confuse my IDE --- src/download.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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>; -#[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(()) } -- cgit v1.2.3