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
|
@ -35,7 +35,7 @@ euclid = "0.10.1"
|
|||
fnv = "1.0"
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
heapsize = "0.3.6"
|
||||
heapsize_plugin = "0.1.2"
|
||||
heapsize_derive = "0.1"
|
||||
html5ever = {version = "0.5.1", features = ["heap_size", "unstable"]}
|
||||
hyper = "0.9.9"
|
||||
hyper_serde = "0.1.4"
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ use dom::window::Window;
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/#validity-states
|
||||
#[derive_JSTraceable]
|
||||
#[derive_HeapSizeOf]
|
||||
#[derive(HeapSizeOf)]
|
||||
pub enum ValidityStatus {
|
||||
ValueMissing,
|
||||
TypeMismatch,
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#![feature(on_unimplemented)]
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(plugin)]
|
||||
#![feature(proc_macro)]
|
||||
#![feature(slice_patterns)]
|
||||
#![feature(stmt_expr_attributes)]
|
||||
#![feature(try_from)]
|
||||
|
@ -24,7 +25,6 @@
|
|||
|
||||
#![doc = "The script crate contains all matters DOM."]
|
||||
|
||||
#![plugin(heapsize_plugin)]
|
||||
#![plugin(phf_macros)]
|
||||
#![plugin(plugins)]
|
||||
|
||||
|
@ -46,6 +46,7 @@ extern crate euclid;
|
|||
extern crate fnv;
|
||||
extern crate gfx_traits;
|
||||
extern crate heapsize;
|
||||
#[macro_use] extern crate heapsize_derive;
|
||||
extern crate html5ever;
|
||||
extern crate hyper;
|
||||
extern crate hyper_serde;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue