diff options
| author | mat <git@matdoes.dev> | 2025-12-28 14:31:41 +0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-12-28 14:31:41 +0500 |
| commit | 7ab3b8924f64f7eadb6b8928b6fae73cb06e4c2f (patch) | |
| tree | 5add5d27fd7c2638ebe6fab9bd7adcdae28a358d /azalea-client/src/local_player.rs | |
| parent | 9513f42e87f64c409cdb2a100500a50e5a713bac (diff) | |
| download | azalea-drasl-7ab3b8924f64f7eadb6b8928b6fae73cb06e4c2f.tar.xz | |
move Event and auto_reconnect to the azalea crate
Diffstat (limited to 'azalea-client/src/local_player.rs')
| -rw-r--r-- | azalea-client/src/local_player.rs | 28 |
1 files changed, 2 insertions, 26 deletions
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<dyn error::Error + Send + Sync>), - #[error("{0}")] - Send(#[from] mpsc::error::SendError<AzaleaEvent>), -} - -impl<T> From<PoisonError<T>> for HandlePacketError { - fn from(e: PoisonError<T>) -> Self { - HandlePacketError::Poison(e.to_string()) - } -} |
