aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/num.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-11-02 21:49:08 -0500
committerGitHub <noreply@github.com>2016-11-02 21:49:08 -0500
commitc6e15f8ef244a0f3859489ca7f1c7bcc80181468 (patch)
treed323a325152393e9290480d78af257147a445441 /components/script/dom/bindings/num.rs
parent70641a777ad4d0d566857aa01983a46a43724699 (diff)
parent391296278db4e815daaa72e62bacd88dbde9f7b1 (diff)
downloadservo-c6e15f8ef244a0f3859489ca7f1c7bcc80181468.tar.gz
servo-c6e15f8ef244a0f3859489ca7f1c7bcc80181468.zip
Auto merge of #14028 - servo:rustup, r=nox,SimonSapin
Update Rust to 1.14.0-nightly (7c69b0d5a 2016-11-01) <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/14028) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/num.rs')
-rw-r--r--components/script/dom/bindings/num.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/script/dom/bindings/num.rs b/components/script/dom/bindings/num.rs
index fde24d08421..03b0c743f9f 100644
--- a/components/script/dom/bindings/num.rs
+++ b/components/script/dom/bindings/num.rs
@@ -4,6 +4,7 @@
//! The `Finite<T>` struct.
+use heapsize::HeapSizeOf;
use num_traits::Float;
use std::ops::Deref;
@@ -38,3 +39,9 @@ impl<T: Float> Deref for Finite<T> {
value
}
}
+
+impl<T: Float + HeapSizeOf> HeapSizeOf for Finite<T> {
+ fn heap_size_of_children(&self) -> usize {
+ (**self).heap_size_of_children()
+ }
+}