From af0b2582794321daa239b5c4c2c0f9aa76aca922 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Tue, 5 Feb 2019 10:44:52 +0100 Subject: [PATCH] Make vga_buffer::{ScreenChar, Buffer} repr(transparent) --- src/vga_buffer.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vga_buffer.rs b/src/vga_buffer.rs index 66364272..94dbc4c6 100644 --- a/src/vga_buffer.rs +++ b/src/vga_buffer.rs @@ -39,6 +39,7 @@ pub enum Color { /// A combination of a foreground and a background color. #[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[repr(transparent)] struct ColorCode(u8); impl ColorCode { @@ -62,6 +63,7 @@ const BUFFER_HEIGHT: usize = 25; const BUFFER_WIDTH: usize = 80; /// A structure representing the VGA text buffer. +#[repr(transparent)] struct Buffer { chars: [[Volatile; BUFFER_WIDTH]; BUFFER_HEIGHT], }