From 0fb6003f38892ded72ff9a95ff2d9bfe2ca7ef08 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Tue, 25 Mar 2025 15:45:36 -0400 Subject: [PATCH] bitboard: improve const_assert --- src/repr/bitboard.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repr/bitboard.rs b/src/repr/bitboard.rs index 865116a..a09060c 100644 --- a/src/repr/bitboard.rs +++ b/src/repr/bitboard.rs @@ -12,7 +12,7 @@ pub type BitBoardInner = u64; pub struct BitBoard(BitBoardInner); // BitBoard should be big enough to fit all points on the board -const_assert!(std::mem::size_of::() * 8 >= Board::AREA.0 as usize); +const_assert!(BitBoardInner::BITS >= Board::AREA.0 as u32); impl BitBoard { #[allow(clippy::new_without_default)]