Skip to content

Commit dd67846

Browse files
authored
test(core): remove assert_size tests (#7167)
1 parent 54acd32 commit dd67846

2 files changed

Lines changed: 0 additions & 25 deletions

File tree

core/core/src/lib.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -173,21 +173,7 @@ pub mod services;
173173

174174
#[cfg(test)]
175175
mod tests {
176-
use std::mem::size_of;
177-
178176
use super::*;
179-
/// This is not a real test case.
180-
///
181-
/// We assert our public structs here to make sure we don't introduce
182-
/// unexpected struct/enum size change.
183-
#[cfg(target_pointer_width = "64")]
184-
#[test]
185-
fn assert_size() {
186-
assert_eq!(16, size_of::<Operator>());
187-
assert_eq!(360, size_of::<Entry>());
188-
assert_eq!(336, size_of::<Metadata>());
189-
assert_eq!(1, size_of::<EntryMode>());
190-
}
191177

192178
trait AssertSendSync: Send + Sync {}
193179
impl AssertSendSync for Entry {}

core/core/src/types/error.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,6 @@ impl From<Error> for io::Error {
507507

508508
#[cfg(test)]
509509
mod tests {
510-
use std::mem::size_of;
511510
use std::sync::LazyLock;
512511

513512
use anyhow::anyhow;
@@ -528,16 +527,6 @@ mod tests {
528527
backtrace: None,
529528
});
530529

531-
/// This is not a real test case.
532-
///
533-
/// We assert our public structs here to make sure we don't introduce
534-
/// unexpected struct/enum size change.
535-
#[cfg(target_pointer_width = "64")]
536-
#[test]
537-
fn assert_size() {
538-
assert_eq!(88, size_of::<Error>());
539-
}
540-
541530
#[test]
542531
fn test_error_display() {
543532
let s = format!("{}", LazyLock::force(&TEST_ERROR));

0 commit comments

Comments
 (0)