mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Update bit_field to 0.5.0 and use new API
(cherry picked from commit 6eba03dd58)
This commit is contained in:
@@ -4,7 +4,7 @@ name = "blog_os"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bit_field = "0.1.0"
|
bit_field = "0.5.0"
|
||||||
bitflags = "0.7.0"
|
bitflags = "0.7.0"
|
||||||
once = "0.2.1"
|
once = "0.2.1"
|
||||||
rlibc = "0.1.4"
|
rlibc = "0.1.4"
|
||||||
|
|||||||
@@ -66,11 +66,11 @@ impl Entry {
|
|||||||
use bit_field::BitField;
|
use bit_field::BitField;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub struct EntryOptions(BitField<u16>);
|
pub struct EntryOptions(u16);
|
||||||
|
|
||||||
impl EntryOptions {
|
impl EntryOptions {
|
||||||
fn minimal() -> Self {
|
fn minimal() -> Self {
|
||||||
let mut options = BitField::new(0);
|
let mut options = 0;
|
||||||
options.set_range(9..12, 0b111); // 'must-be-one' bits
|
options.set_range(9..12, 0b111); // 'must-be-one' bits
|
||||||
EntryOptions(options)
|
EntryOptions(options)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user