diff --git a/parity-util-mem/src/malloc_size.rs b/parity-util-mem/src/malloc_size.rs index fccdb9bcd..c68f8f660 100644 --- a/parity-util-mem/src/malloc_size.rs +++ b/parity-util-mem/src/malloc_size.rs @@ -585,14 +585,15 @@ impl MallocSizeOf for parking_lot::RwLock { /// /// and when no "any: " /// +/// ```rust /// use parity_util_mem::{malloc_size, malloc_size_of_is_0}; /// -/// struct Data { pub T } +/// struct Data(pub T); /// /// // generic argument (`T`) must be `impl MallocSizeOf` /// malloc_size_of_is_0!(Data); /// -/// assert_eq!(malloc_size(&Data(0u8), 0); +/// assert_eq!(malloc_size(&Data(0u8)), 0); /// ``` #[macro_export] macro_rules! malloc_size_of_is_0(