From a3fb08f5d03819751f2cdc17b14e40870a15be2a Mon Sep 17 00:00:00 2001 From: Horki Date: Mon, 23 Nov 2020 19:52:27 +0100 Subject: [PATCH] http get: clippy; fix try_err --- http-get/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http-get/src/main.rs b/http-get/src/main.rs index d3fb29c..0bb4479 100644 --- a/http-get/src/main.rs +++ b/http-get/src/main.rs @@ -7,7 +7,7 @@ fn http_get_main(url: &str) -> Result<(), Box> { // Send the HTTP request and get a response. let mut response = reqwest::get(url)?; if !response.status().is_success() { - Err(format!("{}", response.status()))?; + return Err(format!("{}", response.status()).into()); } // Read the response body and write it to stdout.