From 87d542f7a172a76378ce457d36049296a4909e9b Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Tue, 5 Feb 2019 10:47:51 +0100 Subject: [PATCH] Update code to current post-10 branch --- Cargo.lock | 2 ++ src/vga_buffer.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index aa9645ec..709bfe80 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,3 +1,5 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. [[package]] name = "array-init" version = "0.0.3" diff --git a/src/vga_buffer.rs b/src/vga_buffer.rs index dd576afa..60fe21d4 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], }