clippy: fix warnings in components/net (#31564)

* clippy: fix some warnings in components/net

* fix: review comments

* fix: tidy
This commit is contained in:
eri 2024-03-10 16:34:16 +01:00 committed by GitHub
parent 099bb0fa19
commit 67b277c992
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 325 additions and 379 deletions

View file

@ -94,7 +94,7 @@ fn create_request(
}
if resource_url.password().is_some() || resource_url.username() != "" {
let basic = base64::engine::general_purpose::STANDARD.encode(&format!(
let basic = base64::engine::general_purpose::STANDARD.encode(format!(
"{}:{}",
resource_url.username(),
resource_url.password().unwrap_or("")
@ -147,7 +147,7 @@ fn process_ws_response(
.hsts_list
.write()
.unwrap()
.update_hsts_list_from_response(resource_url, &response.headers());
.update_hsts_list_from_response(resource_url, response.headers());
Ok(protocol_in_use)
}
@ -389,7 +389,7 @@ fn connect(
&req_url,
&req_builder.origin.ascii_serialization(),
&protocols,
&*http_state,
&http_state,
) {
Ok(c) => c,
Err(e) => return Err(e.to_string()),