aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 851fddb..cf5141e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,9 +1,9 @@
-#![cfg(any(target_arch="x86", target_arch="x86_64"))]
-
+#![cfg(any(target_arch = "x86", target_arch = "x86_64"))]
#![feature(const_fn)]
#![feature(asm)]
#![no_std]
#![cfg_attr(test, allow(unused_features))]
+#![deny(warnings)]
#[macro_use]
extern crate bitflags;
@@ -22,7 +22,7 @@ macro_rules! check_flag {
}
macro_rules! bit {
- ( $x:expr ) => {
+ ($x:expr) => {
1 << $x
};
}
@@ -38,17 +38,17 @@ pub mod irq;
pub mod msr;
pub mod segmentation;
pub mod task;
-pub mod tlb;
pub mod time;
+pub mod tlb;
#[cfg(feature = "performance-counter")]
pub mod perfcnt;
pub mod current {
- #[cfg(target_arch="x86")]
- pub use bits32::*;
- #[cfg(target_arch="x86_64")]
- pub use bits64::*;
+ #[cfg(target_arch = "x86")]
+ pub use bits32::*;
+ #[cfg(target_arch = "x86_64")]
+ pub use bits64::*;
}
pub mod cpuid {
@@ -64,7 +64,7 @@ mod std {
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[repr(u8)]
/// x86 Protection levels
-/// Note: This should not contain values larger than 2 bits, otherwise
+/// Note: This should not contain values larger than 2 bits, otherwise
/// segment descriptor code needs to be adjusted accordingly.
pub enum Ring {
Ring0 = 0b00,
@@ -76,4 +76,4 @@ pub enum Ring {
#[inline(always)]
pub unsafe fn halt() {
asm!("hlt" :::: "volatile");
-} \ No newline at end of file
+}