Use shorter string literals for commands since it's ASCII data
@@ -7,21 +7,21 @@ pub struct Command<T> {
pub fn get_file() -> Command<File> {
Command {
- request: vec![0x47, 0x55, 0x47, 0x45, 0x54, 0x5F, 0x55, 0x46],
+ request: b"GUGET_UF".to_vec(),
parse: File::parse,
}
}
pub fn get_file_count() -> Command<FileCount> {
Command {
- request: vec![0x47, 0x55, 0x47, 0x45, 0x54, 0x55, 0x46, 0x43],
+ request: b"GUGETUFC".to_vec(),
parse: FileCount::parse,
}
}
pub fn get_state_of_health() -> Command<StateOfHealth> {
Command {
- request: vec![0x47, 0x55, 0x47, 0x45, 0x54, 0x53, 0x4F, 0x48],
+ request: b"GUGETSOH".to_vec(),
parse: StateOfHealth::parse,
}
}
