Fix build error when hyper's server feature isn't enabled

hyper's `server` feature is not always enabled. The `hyper::Error::is_parse_too_large` function isn't included when `server` isn't enabled.

Fortunately, it doesn't matter to us: `Error:is_parse` matches `parse_too_large` errors, so removing this check does not change behavior whatsoever.
This commit is contained in:
George Hahn 2024-06-07 02:08:54 -06:00
parent e1113dd5e2
commit bd5c284790

View file

@ -321,7 +321,7 @@ impl From<http::Error> for Error {
impl From<hyper::Error> for Error {
fn from(err: hyper::Error) -> Self {
if err.is_parse() || err.is_parse_too_large() || err.is_parse_status() || err.is_user() {
if err.is_parse() || err.is_parse_status() || err.is_user() {
return Self::new(ErrorKind::Internal, err);
}