trying fix for error

This commit is contained in:
2025-07-14 22:53:40 -04:00
parent 2c84a8bb18
commit 981e662bd3

View File

@ -75,12 +75,18 @@ pub fn derive_http_get_request(input: TokenStream) -> TokenStream {
} }
let response = actix_web::rt::System::new() let response = actix_web::rt::System::new()
.block_on(async { request.send().await }) .block_on(async {
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?; 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() let body_bytes = actix_web::rt::System::new()
.block_on(async { response.body().await }) .block_on(async {
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?; 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()) let body = Response::receive(body_bytes.to_vec())
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?; .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?;