diff --git a/src/repr/board.rs b/src/repr/board.rs index e224170..db3bed9 100644 --- a/src/repr/board.rs +++ b/src/repr/board.rs @@ -5,15 +5,12 @@ use super::{ }; use const_fn::const_fn; use lazy_static::lazy_static; -use static_assertions::const_assert; use std::{cmp::Ordering, fmt}; // PERF! having `Coord` be of type `u8` (instead of usize) increases // performance by about 1-2% overall pub type Coord = u8; -const_assert!(Board::BOARD_SIZE_RAW <= Coord::MAX as usize); - #[derive(PartialEq, Eq, Copy, Clone, Debug)] pub enum Winner { Player(Piece), @@ -89,8 +86,7 @@ impl fmt::Debug for Board { } impl Board { - const BOARD_SIZE_RAW: usize = 8; - pub const BOARD_SIZE: Coord = Self::BOARD_SIZE_RAW as Coord; + pub const BOARD_SIZE: Coord = 8; /// Area of the board pub const BOARD_AREA: Coord = Self::BOARD_SIZE.pow(2);