From d81e01c2eff58541eb76af8c95fed212fc9287b3 Mon Sep 17 00:00:00 2001 From: Felipe Noronha Date: Wed, 13 Apr 2022 21:21:30 -0300 Subject: [PATCH] fix clippy warning --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 8e83a25..78789cd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -185,7 +185,7 @@ fn get_upgrade_type(headers: &HeaderMap) -> Option { fn remove_connection_headers(headers: &mut HeaderMap) { if headers.get(&*CONNECTION_HEADER).is_some() { - let value = headers.get(&*CONNECTION_HEADER).map(|e| e.clone()).unwrap(); + let value = headers.get(&*CONNECTION_HEADER).cloned().unwrap(); for name in value.to_str().unwrap().split(',') { if !name.trim().is_empty() {