Rlp decode returns Result (#8527)
rlp::decode returns Result Make a best effort to handle decoding errors gracefully throughout the code, using `expect` where the value is guaranteed to be valid (and in other places where it makes sense).
This commit is contained in:
@@ -64,7 +64,7 @@ mod tests {
|
||||
fn should_encode_and_decode_call_type() {
|
||||
let original = CallType::Call;
|
||||
let encoded = encode(&original);
|
||||
let decoded = decode(&encoded);
|
||||
let decoded = decode(&encoded).expect("failure decoding CallType");
|
||||
assert_eq!(original, decoded);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user