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
This commit is contained in:
Sosthène Guédon
2023-02-22 17:43:21 +01:00
parent 494490432a
commit 8fdeefdee1
+2 -2
View File
@@ -37,7 +37,6 @@ pub struct ServiceEndpoint<'pipe, I: 'static, C> {
#[cfg(test)]
mod tests {
use super::{TrussedRequester, TrussedResponder};
use crate::api::{Reply, Request};
use core::mem;
@@ -45,7 +44,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>();
@@ -65,6 +64,7 @@ mod tests {
#[test]
fn test_interchange_size() {
use interchange::Channel;
// The real cost per-client
assert_size::<Channel<Request, Reply>>();
}
}