From fa70a370c8eded25022622098bea1493e5a0fe8f Mon Sep 17 00:00:00 2001 From: kangalioo Date: Sat, 19 Mar 2022 23:38:42 +0100 Subject: [PATCH] Downgrade MSRV to 1.51 --- Cargo.toml | 2 +- src/handshake/client.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f75c45b5..c6009e38 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ documentation = "https://docs.rs/tungstenite/0.17.2" repository = "https://github.com/snapview/tungstenite-rs" version = "0.17.2" edition = "2018" -rust-version = "1.56" +rust-version = "1.51" include = ["benches/**/*", "src/**/*", "LICENSE-*", "README.md", "CHANGELOG.md"] [package.metadata.docs.rs] diff --git a/src/handshake/client.rs b/src/handshake/client.rs index add5808d..8ddac5b7 100644 --- a/src/handshake/client.rs +++ b/src/handshake/client.rs @@ -129,7 +129,7 @@ fn generate_request(mut request: Request) -> Result<(Vec, String)> { // // See similar problem in `hyper`: https://github.com/hyperium/hyper/issues/1492 let headers = request.headers_mut(); - for header in WEBSOCKET_HEADERS { + for &header in &WEBSOCKET_HEADERS { let value = headers.remove(header).ok_or_else(|| { Error::Protocol(ProtocolError::InvalidHeader( HeaderName::from_bytes(header.as_bytes()).unwrap(),