Avoid allocating http_data everytime as it has the Clone trait.

Signed-off-by: Edu4rdSHL <edu4rdshl@protonmail.com>
This commit is contained in:
Edu4rdSHL 2022-02-13 07:28:50 -05:00
parent 243170a633
commit 4e351402a4
No known key found for this signature in database
GPG key ID: 3A574A4009F553E5

View file

@ -33,9 +33,9 @@ pub async fn return_http_data(
let https_send_fut = client.get(&https_url).header(USER_AGENT, &user_agent);
let http_send_fut = client.get(&http_url).header(USER_AGENT, &user_agent);
async move {
let mut http_data = HttpData::default();
let mut http_data = HttpData::default();
async move {
if retries != 1 {
let mut counter = 0;
while counter < retries {