From f1b5a09cf1718ba5ef591361c440d0da9f2984a5 Mon Sep 17 00:00:00 2001 From: Chrislearn Young Date: Tue, 12 Dec 2023 13:13:51 +0800 Subject: [PATCH] Fix compile error: borrow of moved value: `header` --- src/proto/h2/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proto/h2/mod.rs b/src/proto/h2/mod.rs index faa2f8d618..15afe48d23 100644 --- a/src/proto/h2/mod.rs +++ b/src/proto/h2/mod.rs @@ -44,7 +44,7 @@ const CONNECTION_HEADERS: [HeaderName; 5] = [ ]; fn strip_connection_headers(headers: &mut HeaderMap, is_request: bool) { - for header in CONNECTION_HEADERS { + for header in &CONNECTION_HEADERS { if headers.remove(header).is_some() { warn!("Connection header illegal in HTTP/2: {}", header.as_str()); }