Using `async` and `await` with Rust's `hyper` crate results in a `Future` not being executed scenarios
I need some guidance on I'm working on a project and hit a roadblock... I'm currently building an HTTP client using the `hyper` crate version 0.14, and I'm integrating it with `tokio` for asynchronous operations. However, I'm running into a frustrating scenario where my futures aren't being executed as expected. I'm trying to send a GET request and handle the response, but I keep getting the behavior: `Future must be polled`, which indicates that my async function isn't being awaited properly. Here's the relevant code snippet: ```rust use hyper::{Client, Request, Body}; use hyper::client::HttpConnector; use tokio; #[tokio::main] async fn main() { let client = Client::new(); let req = Request::builder() .method("GET") .uri("http://httpbin.org/get") .body(Body::empty()) .unwrap(); match client.request(req).await { Ok(res) => { println!("Response: {}", res.status()); }, Err(err) => { eprintln!("behavior: {}", err); } } } ``` I’ve tried ensuring that I have the correct dependencies in my `Cargo.toml`: ```toml [dependencies] hyper = "0.14" tokio = { version = "1", features = ["full"] } ``` Additionally, I've confirmed that I am using the latest version of Rust stable (1.65.0) and that everything compiles without issues. However, when I run the program, it doesn't seem to make the HTTP request at all, leading to the `Future must be polled` behavior. I suspect it might be related to how I'm structuring my async context, but I'm not sure. Is there something I'm missing with the way `tokio` handles async tasks, or is there a potential misconfiguration in my code? Any insights would be greatly appreciated! This is part of a larger API I'm building. How would you solve this? I'd really appreciate any guidance on this.