aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/testrunner.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-10-16 11:21:21 -0500
committerGitHub <noreply@github.com>2017-10-16 11:21:21 -0500
commita9022be0c3e30249845ca5947ac0c0a6743c7991 (patch)
tree00ce691d18ebd214fa85e811955db511d69ffec2 /components/script/dom/testrunner.rs
parent5e3c4c21986b10ac7292d75245e57700f5075b1a (diff)
parentaa15dc269f41503d81ad44cd7e85d69e6f4aeac7 (diff)
downloadservo-a9022be0c3e30249845ca5947ac0c0a6743c7991.tar.gz
servo-a9022be0c3e30249845ca5947ac0c0a6743c7991.zip
Auto merge of #18900 - servo:box_syntax, r=emilio
Remove use of unstable box syntax. http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18900) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/testrunner.rs')
-rw-r--r--components/script/dom/testrunner.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/testrunner.rs b/components/script/dom/testrunner.rs
index 972bc729723..84a533786b8 100644
--- a/components/script/dom/testrunner.rs
+++ b/components/script/dom/testrunner.rs
@@ -27,7 +27,7 @@ impl TestRunner {
}
pub fn new(global: &GlobalScope) -> DomRoot<TestRunner> {
- reflect_dom_object(box TestRunner::new_inherited(),
+ reflect_dom_object(Box::new(TestRunner::new_inherited()),
global,
TestRunnerBinding::Wrap)
}