fix some lints
Some checks failed
Rust / rustfmt (pull_request) Successful in 20s
Rust / clippy (pull_request) Failing after 1m11s
Rust / build (pull_request) Successful in 2m56s

This commit is contained in:
Dominic 2024-07-07 13:54:31 +02:00
parent a4a96c809d
commit fd4f67336b
Signed by: msrd0
GPG key ID: AAF7C8430CA3345D
4 changed files with 4 additions and 13 deletions

View file

@ -4,7 +4,6 @@ mod player;
mod room;
use self::{grid::Grid, player::Player, room::Room};
use super::Activity;
use crate::State;
use comfy::{error, EngineContext};

View file

@ -27,7 +27,7 @@ struct Tile {
#[derive(Debug)]
pub struct Room {
room_type: RoomType,
_room_type: RoomType,
pub size: (u8, u8), //(width, height)
pub grid: Grid,
furnitures: Vec<Tile>
@ -54,7 +54,7 @@ impl Room {
let furnitures = Self::random_room_furniture(&room_type, size, ctx);
Room {
room_type,
_room_type: room_type,
size,
grid: Self::create_grid(size.0, size.1),
furnitures
@ -80,7 +80,6 @@ impl Room {
let mut furnitures = Vec::new();
let mut empty_spots: IndexSet<u8> = (0 .. width).collect();
let mut assets_used: HashSet<&'static str> = HashSet::new();
fn random_empty_spot<T>(empty_spots: &mut IndexSet<T>) -> Option<T> {
if empty_spots.is_empty() {

View file

@ -1,11 +1,4 @@
use crate::{
activities::{
house::{self, HouseState},
Activity
},
game::ZLayer,
State
};
use crate::{activities::Activity, game::ZLayer, State};
use comfy::{
draw_circle, draw_rect_outline, draw_sprite, error, info, is_key_down,
main_camera_mut, EngineContext, IVec2, KeyCode, Vec2, RED, WHITE

View file

@ -86,7 +86,7 @@ impl Sub<i32> for ZLayer {
}
}
pub fn setup(state: &mut State, ctx: &mut EngineContext<'_>) {
pub fn setup(_state: &mut State, ctx: &mut EngineContext<'_>) {
Assets::load(ctx);
}