solution to exercise 03_09

This commit is contained in:
David Doblas Jiménez 2024-06-27 16:16:19 +02:00
parent 4913da035f
commit d54a1e160b

View File

@ -13,7 +13,7 @@ mod tests {
#[test] #[test]
fn string_size() { fn string_size() {
assert_eq!(size_of::<String>(), todo!()); assert_eq!(size_of::<String>(), 24);
} }
#[test] #[test]
@ -23,6 +23,6 @@ mod tests {
// but, in general, the memory layout of structs is a more complex topic. // but, in general, the memory layout of structs is a more complex topic.
// If you're curious, check out the "Data layout" section of the Rustonomicon // If you're curious, check out the "Data layout" section of the Rustonomicon
// https://doc.rust-lang.org/nomicon/data.html for more information. // https://doc.rust-lang.org/nomicon/data.html for more information.
assert_eq!(size_of::<Ticket>(), todo!()); assert_eq!(size_of::<Ticket>(), 72);
} }
} }