clippy: Fix warnings in components/net (#31626)

* clippy: fix warnings in `components/net`

* fix: review comments
This commit is contained in:
eri 2024-03-13 10:40:04 +01:00 committed by GitHub
parent 5ea0531775
commit 63527f56ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 54 additions and 53 deletions

View file

@ -132,10 +132,10 @@ fn apply_algorithm_to_response<S: ArrayLength<u8>, D: Digest<OutputSize = S>>(
/// <https://w3c.github.io/webappsec-subresource-integrity/#is-response-eligible>
fn is_eligible_for_integrity_validation(response: &Response) -> bool {
match response.response_type {
ResponseType::Basic | ResponseType::Default | ResponseType::Cors => true,
_ => false,
}
matches!(
response.response_type,
ResponseType::Basic | ResponseType::Default | ResponseType::Cors
)
}
/// <https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist>