config: update tests

This commit is contained in:
Astro 2020-09-24 23:21:54 +02:00
parent b3e9a1b636
commit f690599f9e

View File

@ -197,7 +197,7 @@ mod test {
};
let mut buffer = [0; EEPROM_SIZE];
let buffer = config.encode(&mut buffer).unwrap();
let buffer = to_slice(&config, &mut buffer).unwrap();
assert!(buffer.len() <= EEPROM_SIZE);
}
@ -222,8 +222,8 @@ mod test {
};
let mut buffer = [0; EEPROM_SIZE];
config.encode(&mut buffer).unwrap();
let decoded = Config::decode(&buffer).unwrap();
to_slice(&config, &mut buffer).unwrap();
let decoded: Config = from_bytes(&buffer).unwrap();
assert_eq!(decoded, config);
}
}