From 4df896a29f8281e232a06f544adfb640370bfda3 Mon Sep 17 00:00:00 2001 From: Chrislearn Young Date: Thu, 14 Dec 2023 21:31:50 +0800 Subject: [PATCH] refactor(http1): fix borrow of moved value: `header` when tracing enabled (#3478) --- 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()); }