From 7b1ed1e771bfbacf6452c778d1bc4738c86611b1 Mon Sep 17 00:00:00 2001 From: tottoto Date: Wed, 11 Oct 2023 23:13:15 +0900 Subject: [PATCH] chore(dependencies): move httparse to http1 feature --- Cargo.toml | 4 ++-- src/error.rs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 68835c82e6..d2d51127b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,13 +26,13 @@ futures-util = { version = "0.3", default-features = false } http = "0.2" http-body = "=1.0.0-rc.2" http-body-util = { version = "=0.1.0-rc.3", optional = true } -httparse = "1.8" h2 = { version = "0.3.9", optional = true } pin-project-lite = "0.2.4" tokio = { version = "1", features = ["sync"] } # Optional +httparse = { version = "1.8", optional = true } httpdate = { version = "1.0", optional = true } itoa = { version = "1", optional = true } libc = { version = "0.2", optional = true } @@ -74,7 +74,7 @@ full = [ ] # HTTP versions -http1 = ["dep:itoa"] +http1 = ["dep:httparse", "dep:itoa"] http2 = ["dep:h2"] # Client/Server diff --git a/src/error.rs b/src/error.rs index 416efcc99a..a51916359d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -456,6 +456,7 @@ impl Parse { } } +#[cfg(feature = "http1")] impl From for Parse { fn from(err: httparse::Error) -> Parse { match err {