From 2bbe4cc371552eaa622f7674b9844979ec77a30a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sosth=C3=A8ne=20Gu=C3=A9don?= Date: Wed, 22 Feb 2023 17:43:21 +0100 Subject: [PATCH] Fix pipe tests I don't really understand why the size is that high. The size of the `Message` struct is 2416. The channel is a message in an unsafecell + 1 atomicU8 and 2 atomic bools. It should only 3 more bytes but for some reason it's 16 --- src/pipe.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pipe.rs b/src/pipe.rs index 3098fd78bc2..f1d6c4d323e 100644 --- a/src/pipe.rs +++ b/src/pipe.rs @@ -45,7 +45,7 @@ mod tests { // size. Bumping the size is not a breaking change but should only be done if really // necessary. - const MAX_SIZE: usize = 2416; + const MAX_SIZE: usize = 2432; fn assert_size() { let size = mem::size_of::(); @@ -65,6 +65,7 @@ mod tests { #[test] fn test_interchange_size() { use interchange::Channel; + // The real cost per-client assert_size::>(); } }