diff --git a/uefi/src/data_types/strs.rs b/uefi/src/data_types/strs.rs index 60c3578f5..4fd86a2f1 100644 --- a/uefi/src/data_types/strs.rs +++ b/uefi/src/data_types/strs.rs @@ -259,7 +259,7 @@ const unsafe fn latin1_from_utf8_at_offset(bytes: &[u8], offset: usize) -> (u8, } else if bytes[offset] & 0b1110_0000 == 0b1100_0000 { let a = (bytes[offset] & 0b0001_1111) as u16; let b = (bytes[offset + 1] & 0b0011_1111) as u16; - let ch = a << 6 | b; + let ch = (a << 6) | b; if ch > 0xff { panic!("input string cannot be encoded as Latin-1"); } diff --git a/uefi/src/proto/network/pxe.rs b/uefi/src/proto/network/pxe.rs index 07c6db47c..3cd642588 100644 --- a/uefi/src/proto/network/pxe.rs +++ b/uefi/src/proto/network/pxe.rs @@ -1039,8 +1039,8 @@ impl DhcpV6Packet { /// The transaction id. #[must_use] pub fn transaction_id(&self) -> u32 { - u32::from(self.transaction_id[0]) << 16 - | u32::from(self.transaction_id[1]) << 8 + (u32::from(self.transaction_id[0]) << 16) + | (u32::from(self.transaction_id[1]) << 8) | u32::from(self.transaction_id[2]) } }