Skip to content

Commit

Permalink
Remove Measurable struct
Browse files Browse the repository at this point in the history
Signed-off-by: Nico Burns <[email protected]>
  • Loading branch information
nicoburns committed Dec 23, 2024
1 parent 27f666d commit af29315
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions malloc_size_of/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,22 +183,3 @@ impl MallocSizeOfOps {
have_seen_ptr_op(ptr as *const c_void)
}
}

/// Measurable that defers to inner value and used to verify MallocSizeOf implementation in a
/// struct.
#[derive(Clone)]
pub struct Measurable<T: MallocSizeOf>(pub T);

impl<T: MallocSizeOf> Deref for Measurable<T> {
type Target = T;

fn deref(&self) -> &T {
&self.0
}
}

impl<T: MallocSizeOf> DerefMut for Measurable<T> {
fn deref_mut(&mut self) -> &mut T {
&mut self.0
}
}

0 comments on commit af29315

Please sign in to comment.