From 19f0b5443ae50c5a991cfef2ca96fc0c2e82aeeb Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Tue, 27 Sep 2016 13:24:01 +0200 Subject: [PATCH] Update bit_field to 0.5.0 and use new API (cherry picked from commit 6eba03dd5881f69140e5a23ae420f3700277eb35) --- Cargo.toml | 2 +- src/interrupts/idt.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6c871db0..b2719d63 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ name = "blog_os" version = "0.1.0" [dependencies] -bit_field = "0.1.0" +bit_field = "0.5.0" bitflags = "0.7.0" once = "0.2.1" rlibc = "0.1.4" diff --git a/src/interrupts/idt.rs b/src/interrupts/idt.rs index 1bd6403f..1cf43ff5 100644 --- a/src/interrupts/idt.rs +++ b/src/interrupts/idt.rs @@ -66,11 +66,11 @@ impl Entry { use bit_field::BitField; #[derive(Debug, Clone, Copy)] -pub struct EntryOptions(BitField); +pub struct EntryOptions(u16); impl EntryOptions { fn minimal() -> Self { - let mut options = BitField::new(0); + let mut options = 0; options.set_range(9..12, 0b111); // 'must-be-one' bits EntryOptions(options) }