Repository: actix/actix-web (language: rust)

Issue:
awc example does not run under tokio::main
Hi @robjtede, When I was trying to use `awc` to write a test client for myself, I encountered a small issue. Now, I want to try to fix it.🙋‍♀️

## Expected Behavior
I hope to be able to directly use `cargo run --example` client to run `awc`.

## Current Behavior
Currently, using the `#[tokio::main]` macro causes awc, which requires a single-threaded context, to fail to start and report an error.
```rust
thread 'main' panicked at awc/src/client/connection.rs:158:22:
`spawn_local` called from outside of a `task::LocalSet`

```

## Possible Solution
Using `#[actix_rt::main]` instead of `#[tokio::main]` can solve this problem. Addtionally, I noticed that comments in other places have already been updated, but this one seems to have been overlooked.
I've already raise a PR to fix this.
https://github.com/actix/actix-web/pull/3421

## Your Environment
- rustc 1.79.0 (129f3b996 2024-06-10)
- Actix Web Version: actix-web v4.8.0



Discussion / hints:

Fix patch:
diff --git a/awc/examples/client.rs b/awc/examples/client.rs
index 16ad330b812..41626315cd3 100644
--- a/awc/examples/client.rs
+++ b/awc/examples/client.rs
@@ -1,6 +1,8 @@
 use std::error::Error as StdError;
 
-#[tokio::main]
+/// If we want to make requests to addresses starting with `https`, we need to enable the rustls feature of awc
+/// `awc = { version = "3.5.0", features = ["rustls"] }`
+#[actix_rt::main]
 async fn main() -> Result<(), Box<dyn StdError>> {
     env_logger::init_from_env(env_logger::Env::new().default_filter_or("info"));
 


Test patch: