From 981e662bd3cfd2d83d2ad8c00bbd1e326a0e8718 Mon Sep 17 00:00:00 2001 From: buckn Date: Mon, 14 Jul 2025 22:53:40 -0400 Subject: [PATCH] trying fix for error --- src/lib.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 49c122d..fb03d81 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -75,12 +75,18 @@ pub fn derive_http_get_request(input: TokenStream) -> TokenStream { } let response = actix_web::rt::System::new() - .block_on(async { request.send().await }) - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?; + .block_on(async { + request.send() + .await + .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string())) + })?; let body_bytes = actix_web::rt::System::new() - .block_on(async { response.body().await }) - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?; + .block_on(async { + response.body() + .await + .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string())) + })?; let body = Response::receive(body_bytes.to_vec()) .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?;