mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Use heapsize_derive instead of heapsize_plugin
This commit is contained in:
parent
b640a83725
commit
5bb4c6c884
34 changed files with 152 additions and 90 deletions
|
@ -625,6 +625,12 @@ impl<T: Reflectable> Deref for Root<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: Reflectable + HeapSizeOf> HeapSizeOf for Root<T> {
|
||||
fn heap_size_of_children(&self) -> usize {
|
||||
(**self).heap_size_of_children()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Reflectable> PartialEq for Root<T> {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.ptr == other.ptr
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue