From 6cbd7d888c7082c2c860f66cbb9848d633f753ed Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 30 Apr 2024 19:46:54 -0600 Subject: [PATCH] Resolve clippy::missing_transmute_annotations --- disasm/src/disasm.rs | 2 +- disasm/src/generated.rs | 2 +- genisa/src/disasm.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/disasm/src/disasm.rs b/disasm/src/disasm.rs index fbda4ad..27be117 100644 --- a/disasm/src/disasm.rs +++ b/disasm/src/disasm.rs @@ -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 { + pub fn args_iter(&self) -> impl Iterator { self.args.iter().take_while(|x| !matches!(x, Argument::None)) } } diff --git a/disasm/src/generated.rs b/disasm/src/generated.rs index 8df474f..bf71a48 100644 --- a/disasm/src/generated.rs +++ b/disasm/src/generated.rs @@ -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::(i) }; } } Self::Illegal diff --git a/genisa/src/disasm.rs b/genisa/src/disasm.rs index 2b02fa8..f131e8a 100644 --- a/genisa/src/disasm.rs +++ b/genisa/src/disasm.rs @@ -338,7 +338,7 @@ pub fn gen_disasm(isa: &Isa, max_args: usize) -> Result { 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::(i) }; } } Self::Illegal