Skip to content

Commit

Permalink
simplifying const asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed May 12, 2024
1 parent 6f83d98 commit 96156d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internals/c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const _: () = {
let std_layout = Layout::new::<RawHandle>();
let win_sys_layout = Layout::new::<HANDLE>();
// MSVR(Rust v1.57): use assert! instead
[(); 1][!(std_layout.size() == win_sys_layout.size()) as usize];
[(); 1][!(std_layout.align() == win_sys_layout.align()) as usize];
[(); 1][std_layout.size() - win_sys_layout.size()];
[(); 1][std_layout.align() - win_sys_layout.align()];
};

// NOTE: to use `size_of` operator, below structs should be packed.
Expand Down

0 comments on commit 96156d1

Please sign in to comment.