From f6c7097267880948c9dec996212094a7b4553128 Mon Sep 17 00:00:00 2001 From: Gustavo Inacio Date: Wed, 19 Jun 2024 13:04:37 -0600 Subject: [PATCH] fix: remove tower service if wasm32 Signed-off-by: Gustavo Inacio --- reqwest-middleware/src/client.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reqwest-middleware/src/client.rs b/reqwest-middleware/src/client.rs index 15145cc..21d51a1 100644 --- a/reqwest-middleware/src/client.rs +++ b/reqwest-middleware/src/client.rs @@ -247,6 +247,7 @@ impl fmt::Debug for ClientWithMiddleware { } } +#[cfg(not(target_arch = "wasm32"))] mod service { use std::{ future::Future, @@ -422,6 +423,7 @@ impl RequestBuilder { /// The timeout is applied from when the request starts connecting until the /// response body has finished. It affects only this request and overrides /// the timeout configured using `ClientBuilder::timeout()`. + #[cfg(not(target_arch = "wasm32"))] pub fn timeout(self, timeout: std::time::Duration) -> Self { RequestBuilder { inner: self.inner.timeout(timeout),