Skip to content

Commit 7f7353e

Browse files
committed
gix-object: fix test for struct size for 32-bit architectures
The size of gix_object::Data is 24 bytes only on 64-bit architectures, on 32-bit architectures it's exactly half that (12 bytes).
1 parent 7611fa4 commit 7f7353e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gix-object/src/data.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ mod tests {
8787

8888
#[test]
8989
fn size_of_object() {
90+
#[cfg(target_pointer_width = "64")]
9091
assert_eq!(std::mem::size_of::<Data<'_>>(), 24, "this shouldn't change unnoticed");
92+
#[cfg(target_pointer_width = "32")]
93+
assert_eq!(std::mem::size_of::<Data<'_>>(), 12, "this shouldn't change unnoticed");
9194
}
9295
}

0 commit comments

Comments
 (0)