From c28869a409480c07122c7500a113f58f1a8706bc Mon Sep 17 00:00:00 2001 From: DimitriTimoz Date: Thu, 28 Dec 2023 17:51:30 +0100 Subject: [PATCH] Fix warnings --- minecraft-protocol/build/blocks.rs | 6 ++---- minecraft-server/src/entities/monsters/zombies.rs | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/minecraft-protocol/build/blocks.rs b/minecraft-protocol/build/blocks.rs index 5e559976..b738fb9a 100644 --- a/minecraft-protocol/build/blocks.rs +++ b/minecraft-protocol/build/blocks.rs @@ -146,9 +146,7 @@ pub fn generate_block_enum(data: serde_json::Value) { raw_harvest_tools.push( block .harvest_tools - .clone() - .into_iter() - .map(|(k, _v)| k) + .clone().into_keys() .collect(), ); let mut material = block @@ -427,7 +425,7 @@ const AIR_BLOCKS: [bool; {max_value}] = {air_blocks:?}; default_state_ids = blocks.iter().map(|b| b.default_state).collect::>(), item_ids = blocks .iter() - .map(|b| b.drops.get(0).copied().unwrap_or(0)) + .map(|b| b.drops.first().copied().unwrap_or(0)) .collect::>(), materials = materials, resistances = blocks.iter().map(|b| b.resistance).collect::>(), diff --git a/minecraft-server/src/entities/monsters/zombies.rs b/minecraft-server/src/entities/monsters/zombies.rs index 65e8ad17..a50735bd 100644 --- a/minecraft-server/src/entities/monsters/zombies.rs +++ b/minecraft-server/src/entities/monsters/zombies.rs @@ -1,5 +1,3 @@ -use minecraft_protocol::network; - use super::*; #[derive(Default)]