diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2016-11-02 18:46:15 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-11-03 01:10:32 +0100 |
commit | 5bb4c6c8846e71c7553cb625464b06ca0fedba08 (patch) | |
tree | c1dd794a9c246d668ccefc4320b6d1871c004231 /components/script/dom/bindings/num.rs | |
parent | b640a83725a2b2a6c93be44107e49f4e99e7d59f (diff) | |
download | servo-5bb4c6c8846e71c7553cb625464b06ca0fedba08.tar.gz servo-5bb4c6c8846e71c7553cb625464b06ca0fedba08.zip |
Use heapsize_derive instead of heapsize_plugin
Diffstat (limited to 'components/script/dom/bindings/num.rs')
-rw-r--r-- | components/script/dom/bindings/num.rs | 7 |
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() + } +} |