aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/http_cache.rs
diff options
context:
space:
mode:
authoreri <eri@inventati.org>2024-03-13 10:40:04 +0100
committerGitHub <noreply@github.com>2024-03-13 09:40:04 +0000
commit63527f56ca53ffad6be4d2552c8f7bb11bc945e2 (patch)
treeec85bf7f29eccf6646d8cbf550f70ec2631ad88d /components/net/http_cache.rs
parent5ea05317757579afa7428f81b5688609341594b1 (diff)
downloadservo-63527f56ca53ffad6be4d2552c8f7bb11bc945e2.tar.gz
servo-63527f56ca53ffad6be4d2552c8f7bb11bc945e2.zip
clippy: Fix warnings in `components/net` (#31626)
* clippy: fix warnings in `components/net` * fix: review comments
Diffstat (limited to 'components/net/http_cache.rs')
-rw-r--r--components/net/http_cache.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/net/http_cache.rs b/components/net/http_cache.rs
index 57acbee8f2a..17dffdea870 100644
--- a/components/net/http_cache.rs
+++ b/components/net/http_cache.rs
@@ -134,10 +134,10 @@ pub struct HttpCache {
/// Determine if a response is cacheable by default <https://tools.ietf.org/html/rfc7231#section-6.1>
fn is_cacheable_by_default(status_code: u16) -> bool {
- match status_code {
- 200 | 203 | 204 | 206 | 300 | 301 | 404 | 405 | 410 | 414 | 501 => true,
- _ => false,
- }
+ matches!(
+ status_code,
+ 200 | 203 | 204 | 206 | 300 | 301 | 404 | 405 | 410 | 414 | 501
+ )
}
/// Determine if a given response is cacheable.