summaryrefslogtreecommitdiff
path: root/kernel/src/testing
diff options
context:
space:
mode:
authorNatrixAeria <upezu@student.kit.edu>2021-04-15 00:05:07 +0200
committerNatrixAeria <upezu@student.kit.edu>2021-04-15 00:05:07 +0200
commit8b810a009f8d29ba61a3c377fdeac06a3bbb151d (patch)
treeec63d4ffb3fec9004c77080b1f84f34950900740 /kernel/src/testing
parent861073d07b0fd70c5017fa96aa67dd7df4de9443 (diff)
Fix most warnings and tidy upbump-rust-version
Diffstat (limited to 'kernel/src/testing')
-rw-r--r--kernel/src/testing/panic.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/kernel/src/testing/panic.rs b/kernel/src/testing/panic.rs
index de07ba8..11469f2 100644
--- a/kernel/src/testing/panic.rs
+++ b/kernel/src/testing/panic.rs
@@ -1,17 +1,15 @@
-use crate::io::{qemu, serial, vga_text};
+use crate::io::{qemu, serial};
use core::fmt::Write;
use core::panic::PanicInfo;
use qemu::{exit_qemu, QemuExitCode};
use serial::SerialStream;
-use vga_text::OStream;
use x86_64::instructions::interrupts;
-pub fn serial_should_panic(info: &PanicInfo) -> ! {
+pub fn serial_should_panic(_info: &PanicInfo) -> ! {
interrupts::disable();
let mut stdout = SerialStream::new();
write!(stdout, "\nOK\nsuccessfully panicked\n").unwrap();
- exit_qemu(QemuExitCode::Success);
- loop {}
+ exit_qemu(QemuExitCode::Success)
}
pub fn serial_panic(info: &PanicInfo) -> ! {
@@ -24,14 +22,12 @@ pub fn serial_panic(info: &PanicInfo) -> ! {
info
)
.unwrap();
- exit_qemu(QemuExitCode::Failed);
- loop {}
+ exit_qemu(QemuExitCode::Failed)
}
pub fn should_panic(_info: &PanicInfo) -> ! {
interrupts::disable();
- exit_qemu(QemuExitCode::Success);
- loop {}
+ exit_qemu(QemuExitCode::Success)
}
pub fn panic(info: &PanicInfo) -> ! {