Skip to content

Commit

Permalink
Fix nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
james7132 committed Apr 14, 2024
1 parent 27d64f6 commit d185946
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/block/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub use self::wasm::*;
impl Block {
pub const USIZE_COUNT: usize = core::mem::size_of::<Self>() / core::mem::size_of::<usize>();
pub const NONE: Self = Self::from_usize_array([0; Self::USIZE_COUNT]);
pub const ALL: Self = Self::from_usize_array([core::usize::MAX; Self::USIZE_COUNT]);
pub const ALL: Self = Self::from_usize_array([usize::MAX; Self::USIZE_COUNT]);
pub const BITS: usize = core::mem::size_of::<Self>() * 8;

#[inline]
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1201,9 +1201,9 @@ impl Masks {

Masks {
first_block,
first_mask: usize::max_value() << first_rem,
first_mask: usize::MAX << first_rem,
last_block,
last_mask: (usize::max_value() >> 1) >> (BITS - last_rem - 1),
last_mask: (usize::MAX >> 1) >> (BITS - last_rem - 1),
// this is equivalent to `MAX >> (BITS - x)` with correct semantics when x == 0.
}
}
Expand Down

0 comments on commit d185946

Please sign in to comment.