reqwest_client: Remove example (#37410)

Marshall Bowers created

This PR removes the example from the `reqwest_client` crate, as it
doesn't seem worth maintaining.

Release Notes:

- N/A

Change summary

Cargo.lock                               |  1 
crates/reqwest_client/Cargo.toml         |  5 ---
crates/reqwest_client/examples/client.rs | 41 --------------------------
3 files changed, 47 deletions(-)

Detailed changes

Cargo.lock 🔗

@@ -13748,7 +13748,6 @@ dependencies = [
  "regex",
  "reqwest 0.12.15 (git+https://github.com/zed-industries/reqwest.git?rev=951c770a32f1998d6e999cef3e59e0013e6c4415)",
  "serde",
- "smol",
  "tokio",
  "workspace-hack",
 ]

crates/reqwest_client/Cargo.toml 🔗

@@ -15,10 +15,6 @@ test-support = []
 path = "src/reqwest_client.rs"
 doctest = true
 
-[[example]]
-name = "client"
-path = "examples/client.rs"
-
 [dependencies]
 anyhow.workspace = true
 bytes.workspace = true
@@ -26,7 +22,6 @@ futures.workspace = true
 http_client.workspace = true
 http_client_tls.workspace = true
 serde.workspace = true
-smol.workspace = true
 log.workspace = true
 tokio = { workspace = true, features = ["rt", "rt-multi-thread"] }
 regex.workspace = true

crates/reqwest_client/examples/client.rs 🔗

@@ -1,41 +0,0 @@
-use std::time::Instant;
-
-use futures::AsyncReadExt as _;
-use futures::stream::FuturesUnordered;
-use http_client::AsyncBody;
-use http_client::HttpClient;
-use reqwest_client::ReqwestClient;
-use smol::stream::StreamExt;
-
-fn main() {
-    let app = gpui::Application::new();
-    app.run(|cx| {
-        cx.spawn(async move |cx| {
-            let client = ReqwestClient::new();
-            let start = Instant::now();
-            let requests = [
-                client.get("https://www.google.com/", AsyncBody::empty(), true),
-                client.get("https://zed.dev/", AsyncBody::empty(), true),
-                client.get("https://docs.rs/", AsyncBody::empty(), true),
-            ];
-            let mut requests = requests.into_iter().collect::<FuturesUnordered<_>>();
-            while let Some(response) = requests.next().await {
-                let mut body = String::new();
-                response
-                    .unwrap()
-                    .into_body()
-                    .read_to_string(&mut body)
-                    .await
-                    .unwrap();
-                println!("{}", &body.len());
-            }
-            println!("{:?}", start.elapsed());
-
-            cx.update(|cx| {
-                cx.quit();
-            })
-            .ok();
-        })
-        .detach();
-    })
-}