From b71ce9ec7ede258f18dd8ee935ef9f7fc029980f Mon Sep 17 00:00:00 2001 From: tottoto Date: Thu, 12 Oct 2023 02:13:05 +0900 Subject: [PATCH] chore(dependencies): move httparse to http1 feature (#3340) Signed-off-by: Sven Pfennig --- Cargo.toml | 4 ++-- src/error.rs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 343948bf04..6c96f859e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,13 +30,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_wasi = { version = "0.3.9", optional = true } pin-project-lite = "0.2.4" tokio_wasi = { 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 } @@ -78,7 +78,7 @@ full = [ ] # HTTP versions -http1 = ["dep:itoa"] +http1 = ["dep:httparse", "dep:itoa"] http2 = ["dep:h2_wasi"] # 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 {