Skip to content

Commit

Permalink
chore(dependencies): move httparse to http1 feature (#3340)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored Oct 11, 2023
1 parent 5a8f4c0 commit ad1b016
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -74,7 +74,7 @@ full = [
]

# HTTP versions
http1 = ["dep:itoa"]
http1 = ["dep:httparse", "dep:itoa"]
http2 = ["dep:h2"]

# Client/Server
Expand Down
1 change: 1 addition & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ impl Parse {
}
}

#[cfg(feature = "http1")]
impl From<httparse::Error> for Parse {
fn from(err: httparse::Error) -> Parse {
match err {
Expand Down

0 comments on commit ad1b016

Please sign in to comment.