Skip to content

Commit

Permalink
(wasm) fix: remove tower as dependency for wasm32-unknown-unknown (#2510
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jlizen authored Dec 30, 2024
1 parent 224f0b8 commit 1ef8703
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ url = "2.4"
bytes = "1.0"
serde = "1.0"
serde_urlencoded = "0.7.1"
tower = { version = "0.5.2", default-features = false, features = ["timeout", "util"] }
tower-service = "0.3"
futures-core = { version = "0.3.28", default-features = false }
futures-util = { version = "0.3.28", default-features = false }
Expand All @@ -130,6 +129,7 @@ log = "0.4.17"
mime = "0.3.16"
percent-encoding = "2.3"
tokio = { version = "1.0", default-features = false, features = ["net", "time"] }
tower = { version = "0.5.2", default-features = false, features = ["timeout", "util"] }
pin-project-lite = "0.2.11"
ipnet = "2.3"

Expand Down
1 change: 1 addition & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ impl Error {
/// internal equivalents.
///
/// Currently only is used for `tower::timeout::error::Elapsed`.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) fn cast_to_internal_error(error: BoxError) -> BoxError {
if error.is::<tower::timeout::error::Elapsed>() {
Box::new(crate::error::TimedOut) as BoxError
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
//!
//! The Client implementation automatically switches to the WASM one when the target_arch is wasm32,
//! the usage is basically the same as the async api. Some of the features are disabled in wasm
//! : [`tls`], [`cookie`], [`blocking`].
//! : [`tls`], [`cookie`], [`blocking`], as well as various `ClientBuilder` methods such as `timeout()` and `connector_layer()`.
//!
//!
//! ## Optional Features
Expand Down

0 comments on commit 1ef8703

Please sign in to comment.