From 661c3622bebc111a1523bc80792dc90d9d571b24 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 3 Dec 2022 01:22:34 -0600 Subject: make the packets in events be Arc so they're cheap to clone --- azalea-client/src/chat.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'azalea-client/src/chat.rs') diff --git a/azalea-client/src/chat.rs b/azalea-client/src/chat.rs index 5f566fe7..26f37d58 100755 --- a/azalea-client/src/chat.rs +++ b/azalea-client/src/chat.rs @@ -9,13 +9,16 @@ use azalea_protocol::packets::game::{ serverbound_chat_command_packet::ServerboundChatCommandPacket, serverbound_chat_packet::ServerboundChatPacket, }; -use std::time::{SystemTime, UNIX_EPOCH}; +use std::{ + sync::Arc, + time::{SystemTime, UNIX_EPOCH}, +}; /// A chat packet, either a system message or a chat message. #[derive(Debug, Clone, PartialEq)] pub enum ChatPacket { - System(ClientboundSystemChatPacket), - Player(Box), + System(Arc), + Player(Arc), } macro_rules! regex { -- cgit v1.2.3