Skip to content

Commit 850f8a5

Browse files
committed
Upgrade to heapsize 0.1.2.
1 parent b2c6160 commit 850f8a5

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ serde = "*"
1919
serde_macros = "*"
2020

2121
[dependencies.heapsize]
22-
version = "0.1.1"
22+
version = "0.1.2"
2323
optional = true
2424

2525
[dependencies.heapsize_plugin]

src/length.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ use std::marker::PhantomData;
3131
// Uncomment the derive, and remove the macro call, once heapsize gets
3232
// PhantomData<T> support.
3333
#[derive(Copy, RustcDecodable, RustcEncodable, Debug)]
34-
//#[cfg_attr(feature = "heap_size", derive(HeapSizeOf))]
34+
#[cfg_attr(feature = "heap_size", derive(HeapSizeOf))]
3535
pub struct Length<Unit, T>(pub T, PhantomData<Unit>);
36-
#[cfg(feature = "heap_size")]
37-
known_heap_size!(0, Length<Unit, T>);
3836

3937
impl<Unit,T> Deserialize for Length<Unit,T> where T: Deserialize {
4038
fn deserialize<D>(deserializer: &mut D) -> Result<Length<Unit,T>,D::Error>

src/scale_factor.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,8 @@ use std::marker::PhantomData;
3737
// Uncomment the derive, and remove the macro call, once heapsize gets
3838
// PhantomData<T> support.
3939
#[derive(Copy, RustcDecodable, RustcEncodable, Debug)]
40-
//#[cfg_attr(feature = "heap_size", derive(HeapSizeOf))]
40+
#[cfg_attr(feature = "heap_size", derive(HeapSizeOf))]
4141
pub struct ScaleFactor<Src, Dst, T>(pub T, PhantomData<(Src, Dst)>);
42-
#[cfg(feature = "heap_size")]
43-
known_heap_size!(0, ScaleFactor<Src, Dst, T>);
4442

4543

4644
impl<Src,Dst,T> Deserialize for ScaleFactor<Src,Dst,T> where T: Deserialize {

0 commit comments

Comments
 (0)