From b6586d500cc01b790aa11b019cca9a829e3efc27 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 15 Sep 2023 17:09:04 -0500 Subject: make Account a component --- azalea/src/swarm/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'azalea/src') 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::(); swarm_tx .send(SwarmEvent::Disconnect(Box::new(owned_account))) .unwrap(); -- cgit v1.2.3