From 920f51f7822fa6c5e6d9f29f94b7e56a418d8199 Mon Sep 17 00:00:00 2001 From: Snowiiii Date: Sun, 4 Aug 2024 12:34:00 +0200 Subject: [PATCH] fix: clippy warns --- pumpkin-protocol/src/client/play/mod.rs | 2 +- pumpkin/src/server.rs | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pumpkin-protocol/src/client/play/mod.rs b/pumpkin-protocol/src/client/play/mod.rs index 10a3c01ad..2b1f544c0 100644 --- a/pumpkin-protocol/src/client/play/mod.rs +++ b/pumpkin-protocol/src/client/play/mod.rs @@ -54,7 +54,7 @@ impl CPlayDisconnect { } } -impl<'a> ClientPacket for CPlayDisconnect { +impl ClientPacket for CPlayDisconnect { const PACKET_ID: VarInt = 0x1D; fn write(&self, bytebuf: &mut ByteBuffer) { diff --git a/pumpkin/src/server.rs b/pumpkin/src/server.rs index 26521dbdf..44f369c68 100644 --- a/pumpkin/src/server.rs +++ b/pumpkin/src/server.rs @@ -8,7 +8,7 @@ use mio::{event::Event, Poll}; use pumpkin_protocol::{ client::{ config::CPluginMessage, - play::{CChunkDataUpdateLight, CGameEvent, CLogin, CSyncPlayerPostion}, + play::{CChunkDataUpdateLight, CGameEvent, CLogin}, }, BitSet, PacketError, Players, Sample, StatusResponse, VarInt, VarInt32, Version, }; @@ -96,9 +96,7 @@ impl Server { pub fn spawn_player(&mut self, client: &mut Client) { dbg!("spawning player"); let entity_id = self.new_entity_id(); - let player = Player::new(Entity { - entity_id, - }); + let player = Player::new(Entity { entity_id }); client.player = Some(player); client @@ -138,7 +136,7 @@ impl Server { } // todo: do this in a world - fn spawn_test_chunk(client: &mut Client) { + fn _spawn_test_chunk(client: &mut Client) { let test_chunk = TestChunk::new(); client .send_packet(CChunkDataUpdateLight::new(