From 8e25f011b407e2abc09defabe1f0fb60bf384053 Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Tue, 20 Feb 2024 20:08:21 +0000 Subject: [PATCH] Remove unnecessary imports --- agb-hashmap/src/lib.rs | 3 --- agb-image-converter/src/palette256.rs | 2 +- agb/examples/chicken.rs | 1 - agb/src/display/affine.rs | 5 +---- agb/src/display/bitmap3.rs | 2 +- agb/src/display/object/unmanaged/attributes.rs | 2 -- agb/src/input.rs | 1 - examples/the-dungeon-puzzlers-lament/src/level.rs | 1 - 8 files changed, 3 insertions(+), 14 deletions(-) diff --git a/agb-hashmap/src/lib.rs b/agb-hashmap/src/lib.rs index c39d8458..7114232c 100644 --- a/agb-hashmap/src/lib.rs +++ b/agb-hashmap/src/lib.rs @@ -32,7 +32,6 @@ use core::{ borrow::Borrow, fmt::Debug, hash::{BuildHasher, BuildHasherDefault, Hash}, - iter::FromIterator, num::Wrapping, ops::Index, }; @@ -949,8 +948,6 @@ impl core::ops::Add for HashType { mod test { use core::{cell::RefCell, hash::Hasher}; - use alloc::vec::Vec; - use super::*; #[test] diff --git a/agb-image-converter/src/palette256.rs b/agb-image-converter/src/palette256.rs index fc9b47ff..8283081b 100644 --- a/agb-image-converter/src/palette256.rs +++ b/agb-image-converter/src/palette256.rs @@ -1,4 +1,4 @@ -use std::{collections::HashSet, iter::FromIterator}; +use std::collections::HashSet; use crate::{ colour::Colour, diff --git a/agb/examples/chicken.rs b/agb/examples/chicken.rs index 30854624..9a247f0b 100644 --- a/agb/examples/chicken.rs +++ b/agb/examples/chicken.rs @@ -11,7 +11,6 @@ use agb::{ }, input::Button, }; -use core::convert::TryInto; #[derive(PartialEq, Eq)] enum State { diff --git a/agb/src/display/affine.rs b/agb/src/display/affine.rs index fa1b269c..bddb6fa6 100644 --- a/agb/src/display/affine.rs +++ b/agb/src/display/affine.rs @@ -81,10 +81,7 @@ //! # } //! ``` -use core::{ - convert::TryFrom, - ops::{Mul, MulAssign}, -}; +use core::ops::{Mul, MulAssign}; use agb_fixnum::{Num, Vector2D}; diff --git a/agb/src/display/bitmap3.rs b/agb/src/display/bitmap3.rs index b29b3177..a1b3fd61 100644 --- a/agb/src/display/bitmap3.rs +++ b/agb/src/display/bitmap3.rs @@ -4,7 +4,7 @@ use super::{ set_graphics_mode, set_graphics_settings, DisplayMode, GraphicsSettings, HEIGHT, WIDTH, }; -use core::{convert::TryInto, marker::PhantomData}; +use core::marker::PhantomData; const BITMAP_MODE_3: MemoryMapped2DArray = unsafe { MemoryMapped2DArray::new(0x600_0000) }; diff --git a/agb/src/display/object/unmanaged/attributes.rs b/agb/src/display/object/unmanaged/attributes.rs index 498bfb68..9d75d002 100644 --- a/agb/src/display/object/unmanaged/attributes.rs +++ b/agb/src/display/object/unmanaged/attributes.rs @@ -163,8 +163,6 @@ enum ColourMode { #[allow(clippy::module_inception)] mod attributes { - use crate::display::Priority; - use super::*; #[bitsize(16)] diff --git a/agb/src/input.rs b/agb/src/input.rs index 14192e3b..15cf3c31 100644 --- a/agb/src/input.rs +++ b/agb/src/input.rs @@ -1,7 +1,6 @@ #![deny(missing_docs)] use crate::fixnum::Vector2D; use bitflags::bitflags; -use core::convert::From; /// Tri-state enum. Allows for -1, 0 and +1. /// Useful if checking if the D-Pad is pointing left, right, or unpressed. diff --git a/examples/the-dungeon-puzzlers-lament/src/level.rs b/examples/the-dungeon-puzzlers-lament/src/level.rs index ff779e0b..d94c55b0 100644 --- a/examples/the-dungeon-puzzlers-lament/src/level.rs +++ b/examples/the-dungeon-puzzlers-lament/src/level.rs @@ -162,7 +162,6 @@ impl Level { mod levels { use super::*; - use agb::fixnum::Vector2D; include!(concat!(env!("OUT_DIR"), "/levels.rs")); }