Use box syntax instead of Box::new()

Closes #5417
This commit is contained in:
Brandon DeRosier 2015-03-27 19:19:36 -04:00
parent 439e3150d7
commit ccc55d658f
7 changed files with 19 additions and 17 deletions

View file

@ -1097,7 +1097,7 @@ impl ScriptTask {
// https://html.spec.whatwg.org/multipage/#the-end step 4
let addr: Trusted<Document> = Trusted::new(self.get_cx(), document.r(), self.chan.clone());
let handler = Box::new(DocumentProgressHandler::new(addr.clone(), DocumentProgressTask::DOMContentLoaded));
let handler = box DocumentProgressHandler::new(addr.clone(), DocumentProgressTask::DOMContentLoaded);
self.chan.send(ScriptMsg::RunnableMsg(handler)).unwrap();
// We have no concept of a document loader right now, so just dispatch the
@ -1105,7 +1105,7 @@ impl ScriptTask {
// the initial load.
// https://html.spec.whatwg.org/multipage/#the-end step 7
let handler = Box::new(DocumentProgressHandler::new(addr, DocumentProgressTask::Load));
let handler = box DocumentProgressHandler::new(addr, DocumentProgressTask::Load);
self.chan.send(ScriptMsg::RunnableMsg(handler)).unwrap();
window.r().set_fragment_name(final_url.fragment.clone());