Skip to content

Commit

Permalink
Fix pipe tests
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sosthene-nitrokey committed Feb 22, 2023
1 parent 4944904 commit 2bbe4cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>() {
let size = mem::size_of::<T>();
Expand All @@ -65,6 +65,7 @@ mod tests {
#[test]
fn test_interchange_size() {
use interchange::Channel;
// The real cost per-client
assert_size::<Channel<Request, Reply>>();
}
}

0 comments on commit 2bbe4cc

Please sign in to comment.