From fd422721558b45bebbe7cc6eb60771c7b1fe8fc3 Mon Sep 17 00:00:00 2001 From: crumblingstatue Date: Fri, 14 Apr 2023 20:54:00 +0200 Subject: [PATCH] Remove unnecessary end index calculation --- src/world.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/world.rs b/src/world.rs index d566af0..cc87e80 100644 --- a/src/world.rs +++ b/src/world.rs @@ -129,8 +129,6 @@ fn save_chunk(pos: &ChunkPos, chk: &Chunk) { crate::bitmanip::set_nth_bit(&mut existence_bitset.0, loc_idx as usize, true); let byte_idx = loc_byte_idx(loc_idx); dbg!(byte_idx); - let end_idx = byte_idx + CHUNK_BYTES; - dbg!(end_idx); for (i, tile) in chk.tiles.iter().enumerate() { let off = byte_idx + (i * TILE_BYTES); region_tile_data[off..off + 2].copy_from_slice(&tile.bg.to_le_bytes());