Skip to content

Commit ad1b016

Browse files
authored
chore(dependencies): move httparse to http1 feature (#3340)
1 parent 5a8f4c0 commit ad1b016

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ futures-util = { version = "0.3", default-features = false }
2626
http = "0.2"
2727
http-body = "=1.0.0-rc.2"
2828
http-body-util = { version = "=0.1.0-rc.3", optional = true }
29-
httparse = "1.8"
3029
h2 = { version = "0.3.9", optional = true }
3130
pin-project-lite = "0.2.4"
3231
tokio = { version = "1", features = ["sync"] }
3332

3433
# Optional
3534

35+
httparse = { version = "1.8", optional = true }
3636
httpdate = { version = "1.0", optional = true }
3737
itoa = { version = "1", optional = true }
3838
libc = { version = "0.2", optional = true }
@@ -74,7 +74,7 @@ full = [
7474
]
7575

7676
# HTTP versions
77-
http1 = ["dep:itoa"]
77+
http1 = ["dep:httparse", "dep:itoa"]
7878
http2 = ["dep:h2"]
7979

8080
# Client/Server

src/error.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ impl Parse {
456456
}
457457
}
458458

459+
#[cfg(feature = "http1")]
459460
impl From<httparse::Error> for Parse {
460461
fn from(err: httparse::Error) -> Parse {
461462
match err {

0 commit comments

Comments
 (0)