Skip to content

Commit 5148b94

Browse files
committed
Remove Measurable struct
Signed-off-by: Nico Burns <[email protected]>
1 parent 27f666d commit 5148b94

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

malloc_size_of/src/lib.rs

-20
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ mod impls;
5151

5252
use alloc::boxed::Box;
5353
use core::ffi::c_void;
54-
use core::ops::{Deref, DerefMut};
5554

5655
/// Trait for measuring the "deep" heap usage of a data structure. This is the
5756
/// most commonly-used of the traits.
@@ -183,22 +182,3 @@ impl MallocSizeOfOps {
183182
have_seen_ptr_op(ptr as *const c_void)
184183
}
185184
}
186-
187-
/// Measurable that defers to inner value and used to verify MallocSizeOf implementation in a
188-
/// struct.
189-
#[derive(Clone)]
190-
pub struct Measurable<T: MallocSizeOf>(pub T);
191-
192-
impl<T: MallocSizeOf> Deref for Measurable<T> {
193-
type Target = T;
194-
195-
fn deref(&self) -> &T {
196-
&self.0
197-
}
198-
}
199-
200-
impl<T: MallocSizeOf> DerefMut for Measurable<T> {
201-
fn deref_mut(&mut self) -> &mut T {
202-
&mut self.0
203-
}
204-
}

0 commit comments

Comments
 (0)