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 | |
| parent | 3a0752f734f4370a05e45958499ddd9c3a4b3919 (diff) | |
Fix unused imports
| -rw-r--r-- | Cargo.toml | 2 | ||||
| -rw-r--r-- | src/kernel.rs | 10 | ||||
| -rw-r--r-- | src/tests.rs | 2 |
3 files changed, 10 insertions, 4 deletions
@@ -1,6 +1,6 @@ [package] name = "petrichor" -version = "0.1.0" +version = "0.0.1" edition = "2021" authors = [ "Christian Cunningham <c@localhost>" ] 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 |
