From 17aa9ab50293322da1e527942d16c30ab8573fd4 Mon Sep 17 00:00:00 2001 From: Emil Date: Mon, 22 Jun 2026 13:35:41 +0300 Subject: [PATCH] =?UTF-8?q?chore:=20clean=20up=20compiler=20warnings=20?= =?UTF-8?q?=E2=80=94=20unused=20imports,=20variables,=20dead=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/game.rs | 2 +- src/ui/mod.rs | 2 -- src/world/cellular.rs | 8 +++----- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/game.rs b/src/game.rs index 9ffd91d..67e97e3 100644 --- a/src/game.rs +++ b/src/game.rs @@ -1481,7 +1481,7 @@ impl Game { } let x = near_x + dx; let y = near_y + dy; - let sc = crate::world::worldgen::WORLD_SCALE; + let _sc = crate::world::worldgen::WORLD_SCALE; let clear_h = 8; if !self.grid.in_bounds(x, y) || !self.grid.in_bounds(x, y - clear_h) { continue; diff --git a/src/ui/mod.rs b/src/ui/mod.rs index 52ca944..d477386 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -391,8 +391,6 @@ impl UiLayer { player_state: &crate::entity::player::Player, ) { let fs = self.font_scale; - let fh = self.fh(); - let fw = self.fw(); let w = 52 * fs / 2; let h = 62 * fs / 2; let bg = [22u8, 26, 38]; diff --git a/src/world/cellular.rs b/src/world/cellular.rs index 47bf853..3a6554b 100644 --- a/src/world/cellular.rs +++ b/src/world/cellular.rs @@ -1,11 +1,10 @@ -use crate::world::cell::{default_temp, Cell, MaterialId}; +use crate::world::cell::{Cell, MaterialId}; use crate::world::chunk::CHUNK_SIZE; use crate::world::chunked_grid::ChunkedGrid; pub struct CellularAutomaton { tick: u64, rng_state: u64, - temps_buf: Vec, light_tick: u64, } @@ -14,7 +13,6 @@ impl CellularAutomaton { Self { tick: 0, rng_state: 0x1234567890ABCDEF, - temps_buf: Vec::new(), light_tick: 0, } } @@ -347,10 +345,10 @@ impl CellularAutomaton { } fn update_fire(&mut self, grid: &mut ChunkedGrid, x: i32, y: i32) { - let cell = grid.get(x, y); + let _cell = grid.get(x, y); let temp = grid.get_temp(x, y); - let (egt, egd) = grid.get_gas(x, y); + let (_egt, egd) = grid.get_gas(x, y); if egd < 200 { grid.set_gas(x, y, 3, (egd + 5).min(255)); }