diff --git a/src/colors.rs b/src/colors.rs index 11ad75c..85c8707 100644 --- a/src/colors.rs +++ b/src/colors.rs @@ -4,7 +4,7 @@ pub const PALETTE_SIZE: usize = 768; /// Represents a 16 bit color used for vga display. -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] #[repr(u8)] pub enum Color16 { /// Represents the color `Black (0x0)`. @@ -48,7 +48,7 @@ impl From for u8 { } /// Represents a color for vga text modes. -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] #[repr(transparent)] pub struct TextModeColor(u8); diff --git a/src/writers/mod.rs b/src/writers/mod.rs index c6c6efa..a129de3 100644 --- a/src/writers/mod.rs +++ b/src/writers/mod.rs @@ -20,7 +20,7 @@ pub use text_40x50::Text40x50; pub use text_80x25::Text80x25; /// Represents a `ScreenCharacter` in vga text modes. -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] #[repr(C)] pub struct ScreenCharacter { character: u8,