rustfmt
This commit is contained in:
parent
de4e20adb4
commit
ab988326ba
|
@ -10,14 +10,13 @@ use x86_64::{
|
|||
};
|
||||
|
||||
pub mod bump;
|
||||
pub mod linked_list;
|
||||
pub mod fixed_size_block;
|
||||
pub mod linked_list;
|
||||
|
||||
use fixed_size_block::FixedSizeBlockAllocator;
|
||||
|
||||
#[global_allocator]
|
||||
static ALLOCATOR: Locked<FixedSizeBlockAllocator> = Locked::new(
|
||||
FixedSizeBlockAllocator::new());
|
||||
static ALLOCATOR: Locked<FixedSizeBlockAllocator> = Locked::new(FixedSizeBlockAllocator::new());
|
||||
|
||||
pub struct Dummy;
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
use super::Locked;
|
||||
use alloc::alloc::{GlobalAlloc, Layout};
|
||||
use core::{mem, ptr::{self, NonNull}};
|
||||
use core::{
|
||||
mem,
|
||||
ptr::{self, NonNull},
|
||||
};
|
||||
|
||||
struct ListNode {
|
||||
next: Option<&'static mut ListNode>,
|
||||
|
|
12
src/clock.rs
12
src/clock.rs
|
@ -20,15 +20,15 @@ pub fn current_time() -> DateTime<Utc> {
|
|||
}
|
||||
|
||||
#[cfg(test)]
|
||||
use crate::{serial_print, serial_println, println};
|
||||
use crate::{println, serial_print, serial_println};
|
||||
|
||||
#[test_case]
|
||||
fn test_current_time() {
|
||||
serial_print!("current time... ");
|
||||
let now = current_time();
|
||||
println!("{:?}", now);
|
||||
serial_print!("current time... ");
|
||||
let now = current_time();
|
||||
println!("{:?}", now);
|
||||
|
||||
assert_ne!(now.month(), 0);
|
||||
assert_ne!(now.month(), 0);
|
||||
|
||||
serial_println!("[ok]");
|
||||
serial_println!("[ok]");
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::string::ToString;
|
||||
use bootloader::{entry_point, BootInfo};
|
||||
use core::panic::PanicInfo;
|
||||
use alloc::string::ToString;
|
||||
use xe_os::{clock, init, println, wasm};
|
||||
|
||||
entry_point!(kernel_main);
|
||||
|
@ -27,7 +27,7 @@ fn kernel_main(boot_info: &'static BootInfo) -> ! {
|
|||
|
||||
wasm::run();
|
||||
println!("[ ] success");
|
||||
|
||||
|
||||
xe_os::hlt_loop();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue