Resolve clippy::missing_transmute_annotations
This commit is contained in:
parent
d63c94c3e2
commit
6cbd7d888c
|
@ -354,7 +354,7 @@ impl ParsedIns {
|
|||
/// Returns an iterator over the arguments of the instruction,
|
||||
/// stopping at the first [Argument::None].
|
||||
#[inline]
|
||||
pub fn args_iter(&self) -> impl Iterator<Item=&Argument> {
|
||||
pub fn args_iter(&self) -> impl Iterator<Item = &Argument> {
|
||||
self.args.iter().take_while(|x| !matches!(x, Argument::None))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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…
Reference in New Issue