diff options
| author | Christian Cunningham <c@localhost> | 2022-08-22 22:16:58 -0700 |
|---|---|---|
| committer | Christian Cunningham <c@localhost> | 2022-08-22 22:16:58 -0700 |
| commit | a1c8269dc367a6b37986417aa650ec65ac77aae3 (patch) | |
| tree | 5f524a7a391df1e770e01db7dc4ae37b85374fa9 /src | |
| parent | 3a0752f734f4370a05e45958499ddd9c3a4b3919 (diff) | |
Fix unused imports
Diffstat (limited to 'src')
| -rw-r--r-- | src/kernel.rs | 10 | ||||
| -rw-r--r-- | src/tests.rs | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/kernel.rs b/src/kernel.rs index 514596d..42de2be 100644 --- a/src/kernel.rs +++ b/src/kernel.rs @@ -9,17 +9,21 @@ #![test_runner(crate::test_runner)] #![reexport_test_harness_main = "test_main"] -mod qemu; mod serial; mod sync; mod tests; mod vga; -use qemu::*; use serial::*; -use tests::*; use vga::*; use core::panic::PanicInfo; +#[cfg(test)] +mod qemu; +#[cfg(test)] +use qemu::*; +#[cfg(test)] +use tests::*; + /// This function is called on panic. #[cfg(test)] #[panic_handler] diff --git a/src/tests.rs b/src/tests.rs index e26c87a..745672a 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -1,4 +1,6 @@ use crate::{serial_print,serial_println}; + +#[cfg(test)] use crate::qemu::*; /// # Testable trait |
