R56VSDHVFTVCZNYYXRMYT5KXJNLJUUASPBWEZ3WGU7HTXSP45GEAC
UEEGB37HSGJL4VCRJYIAJRVAEPREYZTDPIDG7BJIJ4DUUSRX7LOQC
match value { OpCode::NoOp => 0, }
match value {
OpCode::NoOp => 0,
}
// safe due to repr(u8) value as u8
// safe due to repr(u8)
value as u8
} #[test] fn consistency() { for i in 0..=255u8 { let produced: Result<OpCode, _> = i.try_into(); if let Ok(op) = produced { let roundtrip_i: u8 = op.into(); assert!(i == roundtrip_i); } }
#[test]
fn consistency() {
for i in 0..=255u8 {
let produced: Result<OpCode, _> = i.try_into();
if let Ok(op) = produced {
let roundtrip_i: u8 = op.into();
assert!(i == roundtrip_i);