Skip to content

Commit 7c56d05

Browse files
committed
chore: fix clippy issues
Signed-off-by: Xin Liu <[email protected]>
1 parent 34aac57 commit 7c56d05

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/proxy/http_proxy.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,10 @@ impl HttpProxy {
4747
if !matches!(
4848
key_str,
4949
"host" | "connection" | "transfer-encoding" | "content-length"
50-
) {
51-
if let Ok(name) = reqwest::header::HeaderName::from_bytes(key.as_str().as_bytes()) {
52-
if let Ok(val) = reqwest::header::HeaderValue::from_bytes(value.as_bytes()) {
53-
request_headers.insert(name, val);
54-
}
55-
}
50+
) && let Ok(name) = reqwest::header::HeaderName::from_bytes(key.as_str().as_bytes())
51+
&& let Ok(val) = reqwest::header::HeaderValue::from_bytes(value.as_bytes())
52+
{
53+
request_headers.insert(name, val);
5654
}
5755
}
5856

0 commit comments

Comments
 (0)