aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--azalea-client/src/test_utils/simulation.rs4
-rw-r--r--azalea-core/src/registry_holder/entity_effect.rs2
-rw-r--r--azalea-protocol/src/packets/game/c_container_set_slot.rs2
-rw-r--r--azalea/src/swarm/mod.rs7
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();
}