move use to inside function

This commit is contained in:
Corwin Kuiper 2022-01-06 19:48:44 +00:00
parent 222efe9122
commit e5efdcd29c

View file

@ -161,13 +161,11 @@ pub mod syscall;
/// Interactions with the internal timers
pub mod timer;
#[cfg(not(test))]
use core::fmt::Write;
#[cfg(not(test))]
#[panic_handler]
#[allow(unused_must_use)]
fn panic_implementation(info: &core::panic::PanicInfo) -> ! {
use core::fmt::Write;
if let Some(mut mgba) = mgba::Mgba::new() {
write!(mgba, "{}", info);
mgba.set_level(mgba::DebugLevel::Fatal);