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()))?;