mirror of
https://github.com/edu4rdshl/fhc.git
synced 2026-07-17 23:24:50 +00:00
Avoid allocating http_data everytime as it has the Clone trait.
Signed-off-by: Edu4rdSHL <edu4rdshl@protonmail.com>
This commit is contained in:
parent
243170a633
commit
4e351402a4
1 changed files with 2 additions and 2 deletions
|
|
@ -33,9 +33,9 @@ pub async fn return_http_data(
|
||||||
let https_send_fut = client.get(&https_url).header(USER_AGENT, &user_agent);
|
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);
|
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 {
|
if retries != 1 {
|
||||||
let mut counter = 0;
|
let mut counter = 0;
|
||||||
while counter < retries {
|
while counter < retries {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue