diff --git a/Cargo.toml b/Cargo.toml index b50b8d6c13..67594976d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -118,7 +118,6 @@ as_conversions = "allow" # TODO: tricky cast_possible_truncation = "allow" # TODO: consider cast_precision_loss = "allow" # TODO: consider checked_conversions = "allow" -collapsible_match = "allow" else_if_without_else = "allow" enum_glob_use = "allow" float_arithmetic = "allow" diff --git a/src/proto/h1/conn.rs b/src/proto/h1/conn.rs index 19c1283df7..593d3d9eda 100644 --- a/src/proto/h1/conn.rs +++ b/src/proto/h1/conn.rs @@ -676,11 +676,9 @@ where Version::HTTP_10 => self.state.disable_keep_alive(), // If response is version 1.1 and keep-alive is wanted, add // Connection: keep-alive header when not present - Version::HTTP_11 => { - if self.state.wants_keep_alive() { - head.headers - .insert(CONNECTION, HeaderValue::from_static("keep-alive")); - } + Version::HTTP_11 if self.state.wants_keep_alive() => { + head.headers + .insert(CONNECTION, HeaderValue::from_static("keep-alive")); } _ => (), }