remove redundant nightly features

master
WangRunji 6 years ago
parent a74b893bd2
commit 2f8cfabbca

@ -1,15 +1,10 @@
use core::ptr::Unique;
use core::fmt; use core::fmt;
use spin::Mutex; use spin::Mutex;
use volatile::Volatile; use volatile::Volatile;
use lazy_static::lazy_static;
use x86_64::instructions::port::Port; use x86_64::instructions::port::Port;
use crate::logging::Color; use crate::logging::Color;
use crate::consts::KERNEL_OFFSET; use crate::consts::KERNEL_OFFSET;
use lazy_static::lazy_static;
pub const VGA_BUFFER: Unique<VgaBuffer> = unsafe {
Unique::new_unchecked((KERNEL_OFFSET + 0xb8000) as *mut _)
};
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy)]
struct ColorCode(u8); struct ColorCode(u8);
@ -73,8 +68,7 @@ impl VgaBuffer {
lazy_static! { lazy_static! {
pub static ref VGA_WRITER: Mutex<VgaWriter> = Mutex::new( pub static ref VGA_WRITER: Mutex<VgaWriter> = Mutex::new(
// It is the only user of VGA_BUFFER. So it's safe. VgaWriter::new(unsafe{ &mut *((KERNEL_OFFSET + 0xb8000) as *mut VgaBuffer) })
VgaWriter::new(unsafe{ &mut *VGA_BUFFER.as_ptr() })
); );
} }

@ -1,16 +1,10 @@
#![feature(ptr_internals)]
#![feature(lang_items)] #![feature(lang_items)]
#![feature(const_fn)]
#![feature(alloc)] #![feature(alloc)]
#![feature(naked_functions)] #![feature(naked_functions)]
#![feature(asm)] #![feature(asm)]
#![feature(optin_builtin_traits)] #![feature(optin_builtin_traits)]
#![feature(panic_info_message)] #![feature(panic_info_message)]
#![feature(global_asm)] #![feature(global_asm)]
#![feature(compiler_builtins_lib)]
#![feature(raw)]
#![feature(vec_resize_default)]
#![feature(extern_crate_item_prelude)]
#![no_std] #![no_std]
// just keep it ... // just keep it ...

Loading…
Cancel
Save