aboutsummaryrefslogtreecommitdiff
path: root/azalea/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-09-15 17:09:04 -0500
committermat <git@matdoes.dev>2023-09-15 17:09:04 -0500
commitb6586d500cc01b790aa11b019cca9a829e3efc27 (patch)
treec40e57151fa2b5dcad45175772f6373bc63a4277 /azalea/src
parent659b6a1175298f4e2204c151e1fab0e18548f2ce (diff)
downloadazalea-drasl-b6586d500cc01b790aa11b019cca9a829e3efc27.tar.xz
make Account a component
Diffstat (limited to 'azalea/src')
-rw-r--r--azalea/src/swarm/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/azalea/src/swarm/mod.rs b/azalea/src/swarm/mod.rs
index f2d7e5b6..ba38a17e 100644
--- a/azalea/src/swarm/mod.rs
+++ b/azalea/src/swarm/mod.rs
@@ -537,7 +537,6 @@ impl Swarm {
let cloned_bots = self.bots.clone();
let cloned_bots_tx = self.bots_tx.clone();
let cloned_bot = bot.clone();
- let owned_account = account.clone();
let swarm_tx = self.swarm_tx.clone();
tokio::spawn(async move {
while let Some(event) = rx.recv().await {
@@ -548,6 +547,7 @@ impl Swarm {
}
}
cloned_bots.lock().remove(&bot.entity);
+ let owned_account = cloned_bot.component::<Account>();
swarm_tx
.send(SwarmEvent::Disconnect(Box::new(owned_account)))
.unwrap();