From 7ab3b8924f64f7eadb6b8928b6fae73cb06e4c2f Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 28 Dec 2025 14:31:41 +0500 Subject: move Event and auto_reconnect to the azalea crate --- azalea-client/src/local_player.rs | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'azalea-client/src/local_player.rs') diff --git a/azalea-client/src/local_player.rs b/azalea-client/src/local_player.rs index 977b38f3..cc2a28dc 100644 --- a/azalea-client/src/local_player.rs +++ b/azalea-client/src/local_player.rs @@ -1,19 +1,13 @@ -use std::{ - collections::HashMap, - error, io, - sync::{Arc, PoisonError}, -}; +use std::{collections::HashMap, sync::Arc}; use azalea_core::game_type::GameMode; use azalea_world::{Instance, PartialInstance}; use bevy_ecs::{component::Component, prelude::*}; use derive_more::{Deref, DerefMut}; use parking_lot::RwLock; -use thiserror::Error; -use tokio::sync::mpsc; use uuid::Uuid; -use crate::{ClientInformation, events::Event as AzaleaEvent, player::PlayerInfo}; +use crate::{ClientInformation, player::PlayerInfo}; /// A component that keeps strong references to our [`PartialInstance`] and /// [`Instance`] for local players. @@ -145,21 +139,3 @@ impl InstanceHolder { self.partial_instance.write().reset(); } } - -#[derive(Debug, Error)] -pub enum HandlePacketError { - #[error("{0}")] - Poison(String), - #[error(transparent)] - Io(#[from] io::Error), - #[error(transparent)] - Other(#[from] Box), - #[error("{0}")] - Send(#[from] mpsc::error::SendError), -} - -impl From> for HandlePacketError { - fn from(e: PoisonError) -> Self { - HandlePacketError::Poison(e.to_string()) - } -} -- cgit v1.2.3