aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/xmlhttprequest.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-01-02 12:45:28 +0100
committerJosh Matthews <josh@joshmatthews.net>2015-01-08 09:58:46 -0500
commit16c7060bc8ff91527ae97f8a3feee5706747b9c5 (patch)
tree0cc29f2cc50c729d3a8f9521a22991fad67b9afd /components/script/dom/xmlhttprequest.rs
parentcf616b90a236f88058dbad74b568b4d4379d2829 (diff)
downloadservo-16c7060bc8ff91527ae97f8a3feee5706747b9c5.tar.gz
servo-16c7060bc8ff91527ae97f8a3feee5706747b9c5.zip
Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.
Diffstat (limited to 'components/script/dom/xmlhttprequest.rs')
-rw-r--r--components/script/dom/xmlhttprequest.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs
index 2dc5b91b691..d2721cc7463 100644
--- a/components/script/dom/xmlhttprequest.rs
+++ b/components/script/dom/xmlhttprequest.rs
@@ -63,7 +63,7 @@ use dom::bindings::codegen::UnionTypes::StringOrURLSearchParams;
use dom::bindings::codegen::UnionTypes::StringOrURLSearchParams::{eString, eURLSearchParams};
pub type SendParam = StringOrURLSearchParams;
-#[deriving(PartialEq)]
+#[deriving(PartialEq, Copy)]
#[jstraceable]
enum XMLHttpRequestState {
Unsent = 0,
@@ -90,7 +90,7 @@ impl Runnable for XHRProgressHandler {
}
}
-#[deriving(PartialEq, Clone)]
+#[deriving(PartialEq, Clone, Copy)]
#[jstraceable]
pub struct GenerationId(uint);
@@ -560,10 +560,10 @@ impl<'a> XMLHttpRequestMethods for JSRef<'a, XMLHttpRequest> {
let n = "content-type";
match data {
Some(eString(_)) =>
- request_headers.set_raw(n, vec![join_raw("text/plain", params)]),
+ request_headers.set_raw(n.into_string(), vec![join_raw("text/plain", params)]),
Some(eURLSearchParams(_)) =>
request_headers.set_raw(
- n, vec![join_raw("application/x-www-form-urlencoded", params)]),
+ n.into_string(), vec![join_raw("application/x-www-form-urlencoded", params)]),
None => ()
}
}
@@ -813,7 +813,7 @@ impl<'a> PrivateXMLHttpRequestHelpers for JSRef<'a, XMLHttpRequest> {
// Substep 2
status.map(|RawStatus(code, reason)| {
self.status.set(code);
- *self.status_text.borrow_mut() = ByteString::new(format!("{}", reason).into_bytes());
+ *self.status_text.borrow_mut() = ByteString::new(reason.into_bytes());
});
headers.as_ref().map(|h| *self.response_headers.borrow_mut() = h.clone());