aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/document.rs2
-rw-r--r--components/script/dom/xmlhttprequest.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 243951600e5..d6e5f49b433 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -1090,7 +1090,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
fn LastModified(self) -> DOMString {
match self.last_modified {
Some(ref t) => t.clone(),
- None => format!("{}", time::now().strftime("%m/%d/%Y %H:%M:%S").unwrap()),
+ None => time::now().strftime("%m/%d/%Y %H:%M:%S").unwrap().to_string(),
}
}
diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs
index 6b259ec732b..ec65f98b7b9 100644
--- a/components/script/dom/xmlhttprequest.rs
+++ b/components/script/dom/xmlhttprequest.rs
@@ -616,13 +616,13 @@ impl<'a> XMLHttpRequestMethods for JSRef<'a, XMLHttpRequest> {
referer_url.serialize_host().map(|ref h| buf.push_str(h.as_slice()));
referer_url.port().as_ref().map(|&p| {
buf.push_str(":".as_slice());
- buf.push_str(format!("{}", p).as_slice());
+ buf.push_str(p.to_string().as_slice());
});
referer_url.serialize_path().map(|ref h| buf.push_str(h.as_slice()));
self.request_headers.borrow_mut().set_raw("Referer".to_owned(), vec![buf.into_bytes()]);
},
Ok(Some(ref req)) => self.insert_trusted_header("origin".to_owned(),
- format!("{}", req.origin)),
+ req.origin.to_string()),
_ => {}
}