Skip to content

Fix upcoming lints in clippy 1.85 #1541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion uefi/src/data_types/strs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down
4 changes: 2 additions & 2 deletions uefi/src/proto/network/pxe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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])
}
}
Expand Down
Loading