diff options
| author | mat <git@matdoes.dev> | 2025-12-12 00:20:50 -0430 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-12-12 00:20:50 -0430 |
| commit | 82ad975242292d5875780b4398b62637674bf50a (patch) | |
| tree | a904d9dde2a7467cddfb7dc6b3ae4de485bd8b0f | |
| parent | 4a66f002c276a57e028e9456f6800b0b3c248885 (diff) | |
| download | azalea-drasl-82ad975242292d5875780b4398b62637674bf50a.tar.xz | |
clippy
| -rw-r--r-- | azalea-client/src/test_utils/simulation.rs | 4 | ||||
| -rw-r--r-- | azalea-core/src/registry_holder/entity_effect.rs | 2 | ||||
| -rw-r--r-- | azalea-protocol/src/packets/game/c_container_set_slot.rs | 2 | ||||
| -rw-r--r-- | 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::<T>().unwrap()); } pub fn query_self<D: QueryData, R>(&mut self, f: impl FnOnce(QueryItem<D>) -> R) -> R { - let mut ecs = self.app.world_mut(); + let ecs = self.app.world_mut(); let mut qs = ecs.query::<D>(); - 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::<D>() 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 <https://minecraft.wiki/w/Java_Edition_protocol/Inventory>. 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<Account>, JoinOpts), + Disconnect(Box<Account>, Box<JoinOpts>), /// At least one bot received a chat message. Chat(ChatPacket), } @@ -834,7 +834,10 @@ impl Swarm { .get_component::<Account>() .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(); } |
