misc: apply clippy lints

This commit is contained in:
2025-06-19 15:51:23 +01:00
parent c1d72e8d4c
commit 81433dcbcd
17 changed files with 134 additions and 127 deletions
+3 -2
View File
@@ -16,7 +16,8 @@ fn encode_no_args(opcode: u8) -> u32 {
(opcode << 26) | (sr1 << 21) | (sr2 << 16) | (dr << 11) | (shamt << 6)
}
/// Expands to a match statement that calls encode on instructions that implement [`Encode`]:
/// Expands to a match statement that calls encode on instructions that implement
/// [`Encode`]:
///
/// # Usage
///
@@ -58,7 +59,7 @@ impl Encode for Instruction {
Self::Segment(segment) => {
let opcode = u32::from(self.opcode());
let segment = segment as u8;
(opcode << 26) | (segment as u32)
(opcode << 26) | u32::from(segment)
}
]
)