Skip to content

Commit fc65019

Browse files
committed
Moved some 'use' statements into kmain
Previously, we got unused import warnings during tests. This fixes that. Signed-off-by: SlyMarbo <[email protected]>
1 parent e2fbd55 commit fc65019

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kernel/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ extern crate alloc;
1414

1515
use bootloader::{entry_point, BootInfo};
1616
use core::panic::PanicInfo;
17-
use kernel::{memory, pci, println, time, CPU_ID};
17+
use kernel::{memory, pci, println};
1818

1919
/// This function is called on panic.
2020
#[cfg(not(test))]
@@ -48,6 +48,8 @@ fn kernel_main(boot_info: &'static BootInfo) -> ! {
4848

4949
#[cfg(not(test))]
5050
fn kmain() {
51+
use kernel::{time, CPU_ID};
52+
5153
println!("Kernel ready!");
5254
println!("Kernel booted at {}.", time::boot_time());
5355
if let Some(branding) = CPU_ID.get_processor_brand_string() {

0 commit comments

Comments
 (0)