diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2017-10-31 17:52:31 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2017-10-31 19:08:43 +0100 |
commit | 3c36a36cc942a6cce52d4575ad6c26bbde6e4bd7 (patch) | |
tree | 2195f088d8a31d195f76b61984be05f591f430e1 /components/script/stylesheet_loader.rs | |
parent | a3ac21d23d3fc717334bf4c8df0f9b1c613cbaaa (diff) | |
download | servo-3c36a36cc942a6cce52d4575ad6c26bbde6e4bd7.tar.gz servo-3c36a36cc942a6cce52d4575ad6c26bbde6e4bd7.zip |
Use encoding-rs instead of rust-encoding for CSS parsing
Diffstat (limited to 'components/script/stylesheet_loader.rs')
-rw-r--r-- | components/script/stylesheet_loader.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/components/script/stylesheet_loader.rs b/components/script/stylesheet_loader.rs index 094eff5b022..09b22913424 100644 --- a/components/script/stylesheet_loader.rs +++ b/components/script/stylesheet_loader.rs @@ -13,8 +13,7 @@ use dom::eventtarget::EventTarget; use dom::htmlelement::HTMLElement; use dom::htmllinkelement::{RequestGenerationId, HTMLLinkElement}; use dom::node::{document_from_node, window_from_node}; -use encoding::EncodingRef; -use encoding::all::UTF_8; +use encoding_rs::UTF_8; use hyper::header::ContentType; use hyper::mime::{Mime, TopLevel, SubLevel}; use hyper_serde::Serde; @@ -127,7 +126,7 @@ impl FetchResponseListener for StylesheetContext { let data = if is_css { mem::replace(&mut self.data, vec![]) } else { vec![] }; // TODO: Get the actual value. http://dev.w3.org/csswg/css-syntax/#environment-encoding - let environment_encoding = UTF_8 as EncodingRef; + let environment_encoding = UTF_8; let protocol_encoding_label = metadata.charset.as_ref().map(|s| &**s); let final_url = metadata.final_url; |