fix clippy warns

pull/33/head
Felipe Noronha 2 years ago
parent 6d3c35df9f
commit d41279a2a2
  1. 6
      src/lib.rs

@ -171,7 +171,7 @@ fn get_upgrade_type(headers: &HeaderMap) -> Option<String> {
value
.to_str()
.unwrap()
.split(",")
.split(',')
.any(|e| e.to_lowercase() == "upgrade")
})
.unwrap_or(false)
@ -187,7 +187,7 @@ 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();
for name in value.to_str().unwrap().split(",") {
for name in value.to_str().unwrap().split(',') {
if !name.trim().is_empty() {
headers.remove(name.trim());
}
@ -235,7 +235,7 @@ fn create_proxied_request<B>(
value
.to_str()
.unwrap()
.split(",")
.split(',')
.any(|e| e.to_lowercase() == "trailers")
})
.unwrap_or(false);

Loading…
Cancel
Save