Skip to content

Commit

Permalink
Use rust 1.79's inline const
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenengler committed Sep 9, 2024
1 parent b2931b7 commit 0c2c72a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/host/descriptor/descriptor_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ impl From<DescriptorHandle> for u64 {

impl From<DescriptorHandle> for i32 {
fn from(x: DescriptorHandle) -> i32 {
const _: () = assert!(FD_MAX <= i32::MAX as u32);
const { assert!(FD_MAX <= i32::MAX as u32) };
// the constructor makes sure this won't panic
x.0.try_into().unwrap()
}
Expand Down

0 comments on commit 0c2c72a

Please sign in to comment.