More trait impls

This commit is contained in:
Daniel Beckwith 2020-03-31 18:20:22 -04:00
parent 3d052e69a5
commit cbad0a141e
2 changed files with 3 additions and 3 deletions

View file

@ -4,7 +4,7 @@
pub const PALETTE_SIZE: usize = 768; pub const PALETTE_SIZE: usize = 768;
/// Represents a 16 bit color used for vga display. /// Represents a 16 bit color used for vga display.
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(u8)] #[repr(u8)]
pub enum Color16 { pub enum Color16 {
/// Represents the color `Black (0x0)`. /// Represents the color `Black (0x0)`.
@ -48,7 +48,7 @@ impl From<Color16> for u8 {
} }
/// Represents a color for vga text modes. /// Represents a color for vga text modes.
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
#[repr(transparent)] #[repr(transparent)]
pub struct TextModeColor(u8); pub struct TextModeColor(u8);

View file

@ -20,7 +20,7 @@ pub use text_40x50::Text40x50;
pub use text_80x25::Text80x25; pub use text_80x25::Text80x25;
/// Represents a `ScreenCharacter` in vga text modes. /// Represents a `ScreenCharacter` in vga text modes.
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
#[repr(C)] #[repr(C)]
pub struct ScreenCharacter { pub struct ScreenCharacter {
character: u8, character: u8,