From 82ad975242292d5875780b4398b62637674bf50a Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 12 Dec 2025 00:20:50 -0430 Subject: clippy --- azalea-client/src/test_utils/simulation.rs | 4 ++-- azalea-core/src/registry_holder/entity_effect.rs | 2 +- azalea-protocol/src/packets/game/c_container_set_slot.rs | 2 +- azalea/src/swarm/mod.rs | 7 +++++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/azalea-client/src/test_utils/simulation.rs b/azalea-client/src/test_utils/simulation.rs index 2319a9c4..0aeec3ea 100644 --- a/azalea-client/src/test_utils/simulation.rs +++ b/azalea-client/src/test_utils/simulation.rs @@ -139,9 +139,9 @@ impl Simulation { f(self.app.world().entity(self.entity).get::().unwrap()); } pub fn query_self(&mut self, f: impl FnOnce(QueryItem) -> R) -> R { - let mut ecs = self.app.world_mut(); + let ecs = self.app.world_mut(); let mut qs = ecs.query::(); - let res = qs.get_mut(&mut ecs, self.entity).unwrap_or_else(|_| { + let res = qs.get_mut(ecs, self.entity).unwrap_or_else(|_| { panic!( "Our client is missing a required component {:?}", any::type_name::() diff --git a/azalea-core/src/registry_holder/entity_effect.rs b/azalea-core/src/registry_holder/entity_effect.rs index 7615c4df..442b0e1a 100644 --- a/azalea-core/src/registry_holder/entity_effect.rs +++ b/azalea-core/src/registry_holder/entity_effect.rs @@ -179,7 +179,7 @@ impl Deserialize for PlaySound { // strings. list.strings() .ok_or(DeserializeError::MissingField)? - .into_iter() + .iter() .map(|s| { SoundEvent::from_str(&s.to_str()) .map(Holder::Reference) diff --git a/azalea-protocol/src/packets/game/c_container_set_slot.rs b/azalea-protocol/src/packets/game/c_container_set_slot.rs index 571d8e82..d00080bb 100644 --- a/azalea-protocol/src/packets/game/c_container_set_slot.rs +++ b/azalea-protocol/src/packets/game/c_container_set_slot.rs @@ -11,7 +11,7 @@ pub struct ClientboundContainerSetSlot { pub state_id: u32, /// The slot index. /// - /// See https://minecraft.wiki/w/Java_Edition_protocol/Inventory. + /// See . pub slot: u16, pub item_stack: ItemStack, } diff --git a/azalea/src/swarm/mod.rs b/azalea/src/swarm/mod.rs index e77f3713..feb3ff38 100644 --- a/azalea/src/swarm/mod.rs +++ b/azalea/src/swarm/mod.rs @@ -642,7 +642,7 @@ pub enum SwarmEvent { /// from this event. /// /// [`SwarmBuilder::reconnect_delay`]: crate::swarm::SwarmBuilder::reconnect_after - Disconnect(Box, JoinOpts), + Disconnect(Box, Box), /// At least one bot received a chat message. Chat(ChatPacket), } @@ -834,7 +834,10 @@ impl Swarm { .get_component::() .expect("bot is missing required Account component"); swarm_tx - .send(SwarmEvent::Disconnect(Box::new(account), join_opts.clone())) + .send(SwarmEvent::Disconnect( + Box::new(account), + Box::new(join_opts.clone()), + )) .unwrap(); } -- cgit v1.2.3