From 6bd4a52f01a9aea0541e3db2e3b429a1f431e51a Mon Sep 17 00:00:00 2001 From: GBA bot Date: Sat, 1 Jan 2022 12:10:14 +0000 Subject: [PATCH] Fix warnings --- .../the-hat-chooses-the-wizard/src/enemies.rs | 7 ------ .../src/level_display.rs | 23 ------------------- 2 files changed, 30 deletions(-) diff --git a/examples/the-hat-chooses-the-wizard/src/enemies.rs b/examples/the-hat-chooses-the-wizard/src/enemies.rs index 1e4a91ce..799080c4 100644 --- a/examples/the-hat-chooses-the-wizard/src/enemies.rs +++ b/examples/the-hat-chooses-the-wizard/src/enemies.rs @@ -28,13 +28,6 @@ pub enum EnemyUpdateState { } impl<'a> Enemy<'a> { - pub fn is_empty(&self) -> bool { - match self { - Enemy::Empty => true, - _ => false, - } - } - pub fn new_slime(object: &'a ObjectControl, start_pos: Vector2D) -> Self { Enemy::Slime(Slime::new(object, start_pos + (0, 1).into())) } diff --git a/examples/the-hat-chooses-the-wizard/src/level_display.rs b/examples/the-hat-chooses-the-wizard/src/level_display.rs index bdbb33d6..86b5a362 100644 --- a/examples/the-hat-chooses-the-wizard/src/level_display.rs +++ b/examples/the-hat-chooses-the-wizard/src/level_display.rs @@ -1,33 +1,10 @@ use agb::display::{background::BackgroundRegister, HEIGHT, WIDTH}; -fn num_digits_iter(mut n: u32) -> impl core::iter::Iterator { - let mut length = 0; - core::iter::from_fn(move || { - if n == 0 { - length += 1; - if length <= 1 { - Some(0) - } else { - None - } - } else { - length += 1; - let c = n % 10; - n /= 10; - Some(c as u8) - } - }) -} - const LEVEL_START: u16 = 12 * 28; const NUMBERS_START: u16 = 12 * 28 + 3; const HYPHEN: u16 = 12 * 28 + 11; pub const BLANK: u16 = 11 * 28; -pub fn new_map_store() -> [u16; 20] { - [BLANK; 20] -} - pub fn write_level(background: &mut BackgroundRegister, world: u32, level: u32) { let map = background.get_block(); let mut counter = 0;