example: a reminder that usize is assumed to be 8 bytes long (#188)

This commit is contained in:
Tshepang Lekhonkhobe 2017-05-31 16:23:50 +02:00 committed by Ty Overby
parent 46712f7b13
commit 04b5ff5938
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ fn main() {
let encoded: Vec<u8> = serialize(&world, Infinite).unwrap();
// 8 bytes for the length of the vector, 4 bytes per float.
// 8 bytes for the length of the vector (usize), 4 bytes per float.
assert_eq!(encoded.len(), 8 + 4 * 4);
let decoded: World = deserialize(&encoded[..]).unwrap();