misc: apply clippy lints
This commit is contained in:
@@ -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)
|
||||
}
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user