From 44f59dc7313aacc573fdf5db42891bbc142113e4 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 5 Sep 2019 13:25:17 +0200 Subject: [PATCH] src/client/http_client.rs - H2Client: fix error message in download() --- src/client/http_client.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/client/http_client.rs b/src/client/http_client.rs index a7cf6a60..0701e661 100644 --- a/src/client/http_client.rs +++ b/src/client/http_client.rs @@ -1106,10 +1106,8 @@ impl H2Client { let status = resp.status(); if !status.is_success() { - H2Client::h2api_response(resp) - .map(|_| Err(format_err!("unknown error"))) - .await?; - unreachable!(); + H2Client::h2api_response(resp).await?; // raise error + unreachable!(); } let mut body = resp.into_body();