Fix expected struct sizes for nightly optimizations (no more CI warnings)

This commit is contained in:
xmppftw xmppftw 2023-06-06 11:28:29 +02:00 committed by xmpp ftw
commit c8dcf5e7a7
6 changed files with 27 additions and 0 deletions

View file

@ -254,6 +254,9 @@ mod tests {
assert_size!(DiscoInfoQuery, 24);
assert_size!(DiscoInfoResult, 96);
#[cfg(rustc_nightly)]
assert_size!(Item, 120);
#[cfg(not(rustc_nightly))]
assert_size!(Item, 128);
assert_size!(DiscoItemsQuery, 24);
assert_size!(DiscoItemsResult, 48);

View file

@ -55,6 +55,9 @@ mod tests {
#[test]
fn test_size() {
assert_size!(JidPrepQuery, 24);
#[cfg(rustc_nightly)]
assert_size!(JidPrepResponse, 72);
#[cfg(not(rustc_nightly))]
assert_size!(JidPrepResponse, 80);
}

View file

@ -298,6 +298,9 @@ mod tests {
assert_size!(Mode, 1);
assert_size!(CandidateId, 24);
assert_size!(StreamId, 24);
#[cfg(rustc_nightly)]
assert_size!(Candidate, 128);
#[cfg(not(rustc_nightly))]
assert_size!(Candidate, 136);
assert_size!(TransportPayload, 32);
assert_size!(Transport, 88);

View file

@ -52,6 +52,9 @@ mod tests {
#[cfg(target_pointer_width = "64")]
#[test]
fn test_size() {
#[cfg(rustc_nightly)]
assert_size!(StanzaId, 96);
#[cfg(not(rustc_nightly))]
assert_size!(StanzaId, 104);
assert_size!(OriginId, 24);
}