From 45b73505bff346ea2c33440731a150961f2c105f Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Sat, 7 Sep 2024 17:09:23 +0800 Subject: [PATCH] Update async-std and fix h1_client --- Cargo.toml | 2 +- src/h1/mod.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4c47488..094e1b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ cfg-if = "1.0.0" # h1_client async-h1 = { version = "2.0.0", optional = true } -async-std = { version = "1.6.0", default-features = false, optional = true } +async-std = { version = "1.13.0", default-features = false, optional = true } async-native-tls = { version = "0.3.1", optional = true } dashmap = { version = "5.3.4", optional = true } deadpool = { version = "0.7.0", optional = true } diff --git a/src/h1/mod.rs b/src/h1/mod.rs index e44e765..191146a 100644 --- a/src/h1/mod.rs +++ b/src/h1/mod.rs @@ -104,7 +104,7 @@ impl H1Client { note = "This function is misnamed. Prefer `Config::max_connections_per_host` instead." )] pub fn with_max_connections(max: usize) -> Self { - #[cfg(features = "h1_client")] + #[cfg(feature= "h1_client")] assert!(max > 0, "max_connections_per_host with h1_client must be greater than zero or it will deadlock!"); let config = Config { @@ -269,7 +269,7 @@ impl HttpClient for H1Client { /// /// Config options may not impact existing connections. fn set_config(&mut self, config: Config) -> http_types::Result<()> { - #[cfg(features = "h1_client")] + #[cfg(feature = "h1_client")] assert!(config.max_connections_per_host > 0, "max_connections_per_host with h1_client must be greater than zero or it will deadlock!"); self.config = Arc::new(config); @@ -287,7 +287,7 @@ impl TryFrom for H1Client { type Error = Infallible; fn try_from(config: Config) -> Result { - #[cfg(features = "h1_client")] + #[cfg(feature = "h1_client")] assert!(config.max_connections_per_host > 0, "max_connections_per_host with h1_client must be greater than zero or it will deadlock!"); Ok(Self {