diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2017-10-31 17:30:01 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2017-10-31 19:08:26 +0100 |
commit | a3ac21d23d3fc717334bf4c8df0f9b1c613cbaaa (patch) | |
tree | c73db7dcfa88d39d4fd4144d8ec443dbe8d64aee /components/script/dom/urlsearchparams.rs | |
parent | 43a4f016471d1e1d6b4072f9dd8cf3b8f9dfe48c (diff) | |
download | servo-a3ac21d23d3fc717334bf4c8df0f9b1c613cbaaa.tar.gz servo-a3ac21d23d3fc717334bf4c8df0f9b1c613cbaaa.zip |
Use the url crate without its query_encoding feature
Diffstat (limited to 'components/script/dom/urlsearchparams.rs')
-rw-r--r-- | components/script/dom/urlsearchparams.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/components/script/dom/urlsearchparams.rs b/components/script/dom/urlsearchparams.rs index a5519894c54..a3a297a5f46 100644 --- a/components/script/dom/urlsearchparams.rs +++ b/components/script/dom/urlsearchparams.rs @@ -15,7 +15,6 @@ use dom::bindings::weakref::MutableWeakRef; use dom::globalscope::GlobalScope; use dom::url::URL; use dom_struct::dom_struct; -use encoding::types::EncodingRef; use url::form_urlencoded; // https://url.spec.whatwg.org/#interface-urlsearchparams @@ -140,17 +139,16 @@ impl URLSearchParamsMethods for URLSearchParams { // https://url.spec.whatwg.org/#stringification-behavior fn Stringifier(&self) -> DOMString { - DOMString::from(self.serialize(None)) + DOMString::from(self.serialize_utf8()) } } impl URLSearchParams { // https://url.spec.whatwg.org/#concept-urlencoded-serializer - pub fn serialize(&self, encoding: Option<EncodingRef>) -> String { + pub fn serialize_utf8(&self) -> String { let list = self.list.borrow(); form_urlencoded::Serializer::new(String::new()) - .encoding_override(encoding) .extend_pairs(&*list) .finish() } |