Skip to content

Commit

Permalink
musli: Fix nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
udoprog committed Aug 13, 2024
1 parent 9487bb7 commit 942a74d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/musli/src/int/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ where

macro_rules! fixed {
($ty:ty) => {{
#[allow(irrefutable_let_patterns)]
let Ok(value) =
usize::try_from(<$ty as UnsignedOps>::read_bytes(cx, reader, bo)?)
else {
Expand Down
1 change: 1 addition & 0 deletions crates/musli/src/wire/int.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ where

macro_rules! fixed {
($ty:ty) => {{
#[allow(irrefutable_let_patterns)]
let Ok(value) = usize::try_from(<$ty>::read_bytes(cx, reader, bo)?) else {
return Err(cx.message("Value type out of bounds for usize"));
};
Expand Down

0 comments on commit 942a74d

Please sign in to comment.