mirror of
https://github.com/encounter/ppc750cl.git
synced 2025-07-07 13:45:52 +00:00
Resolve clippy::missing_transmute_annotations
This commit is contained in:
parent
d63c94c3e2
commit
6cbd7d888c
@ -1052,7 +1052,7 @@ impl Opcode {
|
||||
let pattern = OPCODE_PATTERNS[i as usize];
|
||||
if (code & pattern.0) == pattern.1 {
|
||||
// Safety: The enum is repr(u8) and marked non_exhaustive
|
||||
return unsafe { core::mem::transmute(i) };
|
||||
return unsafe { core::mem::transmute::<u8, Opcode>(i) };
|
||||
}
|
||||
}
|
||||
Self::Illegal
|
||||
|
@ -338,7 +338,7 @@ pub fn gen_disasm(isa: &Isa, max_args: usize) -> Result<TokenStream> {
|
||||
let pattern = OPCODE_PATTERNS[i as usize];
|
||||
if (code & pattern.0) == pattern.1 {
|
||||
#[comment = " Safety: The enum is repr(u8) and marked non_exhaustive"]
|
||||
return unsafe { core::mem::transmute(i) };
|
||||
return unsafe { core::mem::transmute::<u8, Opcode>(i) };
|
||||
}
|
||||
}
|
||||
Self::Illegal
|
||||
|
Loading…
x
Reference in New Issue
Block a user