aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/http_loader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/net/http_loader.rs')
-rw-r--r--components/net/http_loader.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/components/net/http_loader.rs b/components/net/http_loader.rs
index e3972f6c0f3..c7b15d785ed 100644
--- a/components/net/http_loader.rs
+++ b/components/net/http_loader.rs
@@ -108,10 +108,7 @@ impl WrappedHttpResponse {
}
fn content_encoding(&self) -> Option<Encoding> {
- let encodings = match self.headers().get::<ContentEncoding>() {
- Some(&ContentEncoding(ref encodings)) => encodings,
- None => return None,
- };
+ let &ContentEncoding(ref encodings) = self.headers().get()?;
if encodings.contains(&Encoding::Gzip) {
Some(Encoding::Gzip)
} else if encodings.contains(&Encoding::Deflate) {