bin: switch deserialization of test data to Node and display changes as hex

This commit is contained in:
Matt Bilker
2018-08-17 20:24:24 -04:00
parent c7b695199a
commit fe3675ad24
2 changed files with 3 additions and 3 deletions

View File

@@ -112,8 +112,8 @@ fn compare_slice(left: &[u8], right: &[u8]) {
}
let (i, _, _) = first;
eprintln!(r#" left: `{:?}`
right: `{:?}`"#, &left[*i..], &right[*i..]);
eprintln!(r#" left: `0x{:02x?}`
right: `0x{:02x?}`"#, &left[*i..], &right[*i..]);
}
}
@@ -185,7 +185,7 @@ fn main() -> std::io::Result<()> {
Err(e) => eprintln!("Unable to parse generated kbin back to struct: {:#?}", e),
};
let value = from_bytes::<Value>(&bytes);
let value = from_bytes::<Node>(&bytes);
match &value {
Ok(obj2) => eprintln!("obj2: {:#?}", obj2),
Err(e) => eprintln!("Unable to parse generated kbin back to `Value`: {:#?}", e),

Binary file not shown.