diff --git a/src/gb.rs b/src/gb.rs
index 27623252de1cb06440c94b0d0de9ff107a9e85df..c800004cc0ae0bdf05705ed449e431d814f9d65c 100644
--- a/src/gb.rs
+++ b/src/gb.rs
@@ -10,12 +10,16 @@ use crate::{
 };
 
 #[cfg(feature = "wasm")]
-use crate::ppu::Palette;
-use std::convert::TryInto;
 use wasm_bindgen::prelude::*;
 
 #[cfg(feature = "wasm")]
-use std::panic::{set_hook, take_hook, PanicInfo};
+use crate::ppu::Palette;
+
+#[cfg(feature = "wasm")]
+use std::{
+    convert::TryInto,
+    panic::{set_hook, take_hook, PanicInfo},
+};
 
 /// Top level structure that abstracts the usage of the
 /// Game Boy system under the Boytacean emulator.