From 06a128b75887b689644239bda4737c926333de85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ihc=E7=AB=A5=E9=9E=8B=40=E6=8F=90=E4=B8=8D=E8=B5=B7?= =?UTF-8?q?=E5=8A=B2?= Date: Fri, 2 Jun 2023 18:34:36 +0800 Subject: [PATCH] fix feature typo --- src/h1/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/h1/mod.rs b/src/h1/mod.rs index e44e765..2152ef5 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 {