fix clippy warning

This commit is contained in:
Felipe Noronha 2022-04-13 21:21:30 -03:00
parent d41279a2a2
commit d81e01c2ef

View File

@ -185,7 +185,7 @@ fn get_upgrade_type(headers: &HeaderMap) -> Option<String> {
fn remove_connection_headers(headers: &mut HeaderMap) { fn remove_connection_headers(headers: &mut HeaderMap) {
if headers.get(&*CONNECTION_HEADER).is_some() { 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(',') { for name in value.to_str().unwrap().split(',') {
if !name.trim().is_empty() { if !name.trim().is_empty() {