Minor cleanup

This commit is contained in:
Michael Kohl 2021-04-01 22:57:02 +07:00
parent 2060c01fd9
commit 19d8ac4cd4
2 changed files with 3 additions and 3 deletions

View File

@ -277,7 +277,7 @@ mod tests {
#[test]
fn it_maps_physical_keys_to_virtual_ones() {
let mut chip8 = Chip8::new();
let chip8 = Chip8::new();
assert_eq!(chip8.keyboard_map(Keycode::A), Some(7));
assert_eq!(chip8.keyboard_map(Keycode::X), Some(0));
assert_eq!(chip8.keyboard_map(Keycode::M), None);
@ -294,7 +294,7 @@ mod tests {
#[test]
fn it_has_a_default_character_set() {
let mut chip8 = Chip8::new();
let chip8 = Chip8::new();
assert_eq!(chip8.memory[0..5], [0xf0, 0x90, 0x90, 0x90, 0xf0])
}
}

View File

@ -1,5 +1,5 @@
use sdl2::event::Event;
use sdl2::keyboard::{Keycode, Scancode};
use sdl2::keyboard::Keycode;
use sdl2::pixels::Color;
use sdl2::rect::Rect;