parity_util_mem/
primitives_impls.rs

1// Copyright 2020 Parity Technologies
2//
3// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6// option. This file may not be copied, modified, or distributed
7// except according to those terms.
8
9//! Implementation of `MallocSize` primitive types.
10
11use primitive_types::{H160, H256, H512, U128, U256, U512};
12
13malloc_size_of_is_0!(U128, U256, U512, H160, H256, H512);
14
15#[cfg(test)]
16mod tests {
17
18	use primitive_types::H256;
19
20	#[test]
21	fn smoky() {
22		let v = vec![H256::zero(), H256::zero()];
23
24		assert!(crate::MallocSizeOfExt::malloc_size_of(&v) >= 64);
25	}
26}