From ccc55d658f92b73a8384973a02f5f7e9f56f34e5 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Fri, 27 Mar 2015 19:19:36 -0400 Subject: Use box syntax instead of Box::new() Closes #5417 --- components/script/script_task.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'components/script/script_task.rs') diff --git a/components/script/script_task.rs b/components/script/script_task.rs index e5463285200..c048b5c9813 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -1097,7 +1097,7 @@ impl ScriptTask { // https://html.spec.whatwg.org/multipage/#the-end step 4 let addr: Trusted = 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()); -- cgit v1.2.3