Revert "pack all structs"

This reverts commit 2c75b82f6b.
This commit is contained in:
Daniel Olsen 2021-05-17 01:30:31 +02:00
parent 2c75b82f6b
commit 2360986a96
1 changed files with 1 additions and 4 deletions

View File

@ -172,7 +172,6 @@ impl Iterator for GameMoveIter {
}
}
#[repr(packed)]
#[derive(Clone, Debug, Copy, PartialEq, Eq, Hash)]
struct Bag {
blue: u8,
@ -249,7 +248,6 @@ impl From<tinyvec::ArrayVec<[Tile; 128]>> for Bag {
}*/
#[repr(packed)]
#[derive(Default, Debug, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
struct Factory (tinyvec::ArrayVec<[Tile; 4]>);
impl Clone for Factory {
@ -272,7 +270,6 @@ impl DerefMut for Factory {
}
#[repr(packed)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
struct Market (tinyvec::ArrayVec<[Tile; 28]>);
impl Default for Market {
@ -301,7 +298,6 @@ type Patterns = [tinyvec::ArrayVec<[Tile; 5]>; 5];
type Row = [bool; 5];
type Wall = [Row; 5];
#[repr(packed)]
#[derive(Debug, Clone, Default, Copy, PartialEq, Eq, Hash)]
struct Board {
score: u8,
@ -674,6 +670,7 @@ impl Hash for Game {
fn hash<H: Hasher>(&self, state: &mut H) {
unsafe{any_as_u8_slice(self).deref().hash(state)}
}
}
// Tests