[board] Use absolute paths with $crate in the piece! macro

This commit is contained in:
Eryn Wells 2024-01-15 17:17:57 -08:00
parent a6b98abb95
commit e9607573c2

View file

@ -124,10 +124,10 @@ pub enum PiecePlacementError {
#[macro_export] #[macro_export]
macro_rules! piece { macro_rules! piece {
($color:ident $shape:ident) => { ($color:ident $shape:ident) => {
Piece::new(Color::$color, Shape::$shape) $crate::piece::Piece::new($crate::piece::Color::$color, $crate::piece::Shape::$shape)
}; };
($color:ident $shape:ident on $square:ident) => { ($color:ident $shape:ident on $square:ident) => {
PlacedPiece::new(piece!($color $shape), Square::$square) $crate::piece::PlacedPiece::new(piece!($color $shape), $crate::square::Square::$square)
} }
} }