From 8b810a009f8d29ba61a3c377fdeac06a3bbb151d Mon Sep 17 00:00:00 2001 From: NatrixAeria Date: Thu, 15 Apr 2021 00:05:07 +0200 Subject: Fix most warnings and tidy up --- kernel/src/testing/panic.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'kernel/src/testing/panic.rs') 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) -> ! { -- cgit v1.2.3-70-g09d2