diff --git a/src/lib.rs b/src/lib.rs index a761b53..7dbb2c2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,9 +14,7 @@ use std::marker::PhantomData; use std::mem::{size_of, align_of}; use std::net::{Ipv4Addr, Ipv6Addr}; use std::os::raw::c_void; -use std::sync::Arc; use std::sync::atomic::{AtomicBool, AtomicIsize, AtomicUsize}; -use std::rc::Rc; /// Get the size of a heap block. /// @@ -206,12 +204,6 @@ impl HeapSizeOf for (T1, T2, T3, T4, T5) } } -impl HeapSizeOf for Arc { - fn heap_size_of_children(&self) -> usize { - (**self).heap_size_of_children() - } -} - impl HeapSizeOf for RefCell { fn heap_size_of_children(&self) -> usize { self.borrow().heap_size_of_children() @@ -241,16 +233,6 @@ impl HeapSizeOf for VecDeque { } } -impl HeapSizeOf for Vec> { - fn heap_size_of_children(&self) -> usize { - // The fate of measuring Rc is still undecided, but we still want to measure - // the space used for storing them. - unsafe { - heap_size_of(self.as_ptr()) - } - } -} - impl HeapSizeOf for HashSet where T: Eq + Hash, S: BuildHasher { fn heap_size_of_children(&self) -> usize {