Skip to content

Commit 333886e

Browse files
Use usize::BITS instead of size_of::<usize>() * 8
As suggested by clippy.
1 parent 048896a commit 333886e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

uefi-raw/src/status.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pub enum Status: usize => {
9898

9999
impl Status {
100100
/// Bit indicating that an UEFI status code is an error.
101-
pub const ERROR_BIT: usize = 1 << (core::mem::size_of::<usize>() * 8 - 1);
101+
pub const ERROR_BIT: usize = 1 << (usize::BITS - 1);
102102

103103
/// Returns true if status code indicates success.
104104
#[inline]

0 commit comments

Comments
 (0)