aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/xmlhttprequest.rs
diff options
context:
space:
mode:
authorAlexander Lopatin <alopatindev@gmail.com>2016-02-07 02:55:21 +0300
committerAlexander Lopatin <alopatindev@gmail.com>2016-02-07 02:55:21 +0300
commit2be49404be8885d97735792c2833d4e8b1cb007f (patch)
treecb2f9e5bbf954ed8fffde7abfa01dbed329048e6 /components/script/dom/xmlhttprequest.rs
parent7c249b1d539c37ab54e9fabfaf0442a5ac0243a9 (diff)
downloadservo-2be49404be8885d97735792c2833d4e8b1cb007f.tar.gz
servo-2be49404be8885d97735792c2833d4e8b1cb007f.zip
Fix #9508: Beautify our union enums constructors
Diffstat (limited to 'components/script/dom/xmlhttprequest.rs')
-rw-r--r--components/script/dom/xmlhttprequest.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs
index 93e46d14510..9b33c4a3221 100644
--- a/components/script/dom/xmlhttprequest.rs
+++ b/components/script/dom/xmlhttprequest.rs
@@ -14,7 +14,6 @@ use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestMetho
use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestResponseType;
use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestResponseType::{Json, Text, _empty};
use dom::bindings::codegen::UnionTypes::BlobOrStringOrURLSearchParams;
-use dom::bindings::codegen::UnionTypes::BlobOrStringOrURLSearchParams::{eBlob, eString, eURLSearchParams};
use dom::bindings::conversions::{ToJSValConvertible};
use dom::bindings::error::{Error, ErrorResult, Fallible};
use dom::bindings::global::{GlobalRef, GlobalRoot};
@@ -1240,17 +1239,17 @@ impl Extractable for SendParam {
// https://fetch.spec.whatwg.org/#concept-bodyinit-extract
fn extract(&self) -> (Vec<u8>, Option<DOMString>) {
match *self {
- eString(ref s) => {
+ BlobOrStringOrURLSearchParams::String(ref s) => {
let encoding = UTF_8 as EncodingRef;
(encoding.encode(s, EncoderTrap::Replace).unwrap(),
Some(DOMString::from("text/plain;charset=UTF-8")))
},
- eURLSearchParams(ref usp) => {
+ BlobOrStringOrURLSearchParams::URLSearchParams(ref usp) => {
// Default encoding is UTF-8.
(usp.serialize(None).into_bytes(),
Some(DOMString::from("application/x-www-form-urlencoded;charset=UTF-8")))
},
- eBlob(ref b) => {
+ BlobOrStringOrURLSearchParams::Blob(ref b) => {
let data = b.get_data();
let content_type = if b.Type().as_ref().is_empty() {
None