From 2f089a0770848f6bb95079541f0c1342295598d4 Mon Sep 17 00:00:00 2001 From: Alexander Medvedev Date: Wed, 18 Dec 2024 23:27:17 +0100 Subject: [PATCH] fix: clippy warns --- pumpkin-world/src/chunk/anvil.rs | 3 +-- pumpkin-world/src/level.rs | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pumpkin-world/src/chunk/anvil.rs b/pumpkin-world/src/chunk/anvil.rs index b34ca80b..775b6910 100644 --- a/pumpkin-world/src/chunk/anvil.rs +++ b/pumpkin-world/src/chunk/anvil.rs @@ -9,7 +9,6 @@ use flate2::bufread::{GzDecoder, GzEncoder, ZlibDecoder, ZlibEncoder}; use crate::{ block::block_registry::BLOCK_ID_TO_REGISTRY_ID, chunk::ChunkWritingError, level::LevelFolder, - WORLD_LOWEST_Y, }; use super::{ @@ -400,7 +399,7 @@ impl AnvilChunkFormat { *v, ( BLOCK_ID_TO_REGISTRY_ID - .get(&v) + .get(v) .expect("Tried saving a block which does not exist."), i, ), diff --git a/pumpkin-world/src/level.rs b/pumpkin-world/src/level.rs index 60883150..7ea1d1a9 100644 --- a/pumpkin-world/src/level.rs +++ b/pumpkin-world/src/level.rs @@ -64,8 +64,8 @@ impl Level { region_folder, }, seed, - chunk_reader: Arc::new(AnvilChunkFormat::default()), - chunk_writer: Arc::new(AnvilChunkFormat::default()), + chunk_reader: Arc::new(AnvilChunkFormat), + chunk_writer: Arc::new(AnvilChunkFormat), loaded_chunks: Arc::new(DashMap::new()), chunk_watchers: Arc::new(DashMap::new()), }